Running DOS BAT file from VBS file 
Author Message
 Running DOS BAT file from VBS file

Hello Everyone,

I am tryng to run dos commands such as execute a batch file from a vbs
scripting host file.

I can execute windows applications with the follow code:

Set WshShell = Wscript.CreateObject("Wscript.Shell")
WshShell.Run ("calc")

but this will not run dos command such as running a BAT file.

Could someone tell me the best way to execute dos commands from with a VBS
file.

Thanks,
Paul




Wed, 06 Mar 2002 03:00:00 GMT  
 Running DOS BAT file from VBS file
Try "%comspec% /c c:\my.bat"

Of course, batch files are as doomed as non-dhtml browsers, in win 2K.

--
mvp Mark L. Ferguson Please reply in newsgroup
marfers notes for OE 5 > (16K) http://www.geocities.com/SiliconValley/Bay/6386/IE_ng_notes.htm

Quote:

> Hello Everyone,

> I am tryng to run dos commands such as execute a batch file from a vbs
> scripting host file.

> I can execute windows applications with the follow code:

> Set WshShell = Wscript.CreateObject("Wscript.Shell")
> WshShell.Run ("calc")

> but this will not run dos command such as running a BAT file.

> Could someone tell me the best way to execute dos commands from with a VBS
> file.

> Thanks,
> Paul





Wed, 06 Mar 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Hiding a DOS window when running a bat file

2. Running dos commands in vbs file

3. Calling *.vbs files to Run From Master VBS File

4. newby, replace DOS .bat file

5. WSH vs DOS bat file

6. passing variables from .bat files to .vbs scripts

7. Calling VBS from BAT file?

8. calling a vbs from a .BAT to rename a file by adding a dot

9. .bat file to launch .vbs

10. Ben?tige Hilfe im Bereich Bat oder VBS File

11. Running a local bat file without the download dialog box prompt

12. running a bat file

 

 
Powered by phpBB® Forum Software