View Single Post
  #1 (permalink)  
Old October 25th, 2006, 12:35 AM
malcomm malcomm is offline
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