Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Other Programming > VBScript
|
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old October 25th, 2006, 12:35 AM
Registered User
 
Join Date: Oct 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Convert a batch file to run in VBscript - WSH issu

Hi
I wonder if anyone can figure out whats going wrong with this.
I'm trying to convert a batch file into VBscript. Batch file runs nicely from within vb but I'd like to do away with the batch and run it all as script. -

Heres the base script that happily runs the batch file-

Dim WSHShell
Set WSHShell = WScript.CreateObject("WScript.Shell")
return = WSHShell.run("Austar_Active.bat")

Heres the batch file thats working. All one line-

call "C:\Program Files\Equilibrium\DeBabelizer Pro 5\DeBabelizerPro.exe" -s "C:\TWC\Austar_National_Satellite.dbs" -f (_c_)"C:\TWC\Austar_National_Satellite.txt" -e


Heres my attemp at all script. It loads DeBabelizer but doesn't load any of the arguments. -

Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
return = WshShell.Run("""" & "C:\Program Files\Equilibrium\DeBabelizer Pro 5\DeBabelizerPro.exe"& """" & " -s C:\TWC\Austar_National_Satellite.dbs -f (_c_) C:\TWC\Austar_National_Satellite.txt -e", 0, true)

Also tried various combinations of the double quotes such as -
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
return = WshShell.Run("""" & "C:\Program Files\Equilibrium\DeBabelizer Pro 5\DeBabelizerPro.exe"& """" & " -s " & """" & "C:\TWC\Austar_National_Satellite.dbs" & """" & " -f (_c_)" & """" & "C:\TWC\Austar_National_Satellite.txt" & """" & " -e", 0, true)


Any help or clues greatly appreciated

regards
malcom






Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
Run a MS DOS Batch file from Excel VBA Louh Excel VBA 1 March 4th, 2008 10:02 PM
Batch convert .htm pages to .asp using template karib Dreamweaver (all versions) 22 July 30th, 2007 04:17 PM
Problem to run batch files from VB application Dmitriy VB How-To 7 September 13th, 2006 11:42 AM
HOWTO run WSH scripts from ASP?? fhameed Classic ASP Professional 1 July 2nd, 2006 10:55 AM
Problem to run batch files from VB Application Dmitriy Pro VB 6 4 April 13th, 2006 02:27 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.