Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DOS command

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I would like to resolve my problem. I wrote this code line:

objShell=server.CreateObject("WScript.Shell")
objShell.Run("prog.exe>>file.txt param_1")

What's the problem? prog.exe is executed with its param_1 as argument, file.txt is created, but it is not written. I would like to redirect stdout to file.txt. Please, do you know what can I do? Thanks...
 


vallelom,

Try this,


Set WshShell = Wscript.CreateObject("Wscript.Shell")
WshShell.run ("cmd /K ""prog.exe > c:\this.txt"" ")


fengshui_1998
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top