I never wrote a VBScript before I just need one to run a setup.exe off a server. Any examples would be great.

Thanks
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
The simple one:

Set shell = CreateObject("WScript.Shell")
file = "\\server\virus\destroyeverything.exe"
shell.Run Chr(34) & file & Chr(34), 1, TRUE


The one with arguements:

Set shell = CreateObject("WScript.Shell")
file = "\\server\virus\destroyeverything.exe"
args = "/Q"
shell.Run Chr(34) & file & Chr(34) & " " & args, 1, TRUE

Heh I forgot to add the tail end... [8D]
Answered 09/03/2004 by: kkaminsk
Ninth Degree Black Belt

Please log in to comment
Answer this question or Comment on this question for clarity