September 7, 2008 at 6:34 pm
I need to have the following command executed in a script via GPO and it has been hinted this will best be accomplished in a vbscript:
start \\server\share\application.exe Provider=sqloledb;Data Source=sqlserver1;Initial Catalog=database1;User Id=Standard_User;Password=password1;
where the program application.exe is to run with the details of an sql instance database1 passed as parameters.
I will be grateful for any help with vbscripting this.
Thanks.
Robert
September 9, 2008 at 12:07 pm
Try something like this:
Dim shellObject
Set shellObject = CreateObject("WScript.Shell")
Dim execObject
Set execObject = shellObject.Exec(" ")
While (execObject.Status = 0)
WScript.Sleep(100)
WEnd
WScript.Shell also has Run method, which waits for spawned process to finish execution. The full description of using WScript.Shell object can be found in MSDN in the discussion of Microsoft Script Technologies.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy