Unless you must code it you might also look at 'psexec' from sysinternals, it will launch a file remotely on a machine, or copy the file to launch on the
machine. And, it will give you the ability to choose interactive or not with
different credentials as well.
> I have the following script that i want to run on remote machines:
> On Error Resume Next
>
> arrComputers = Array("AVST149")
>
> For Each strComputer in arrComputers
>
> Set objWMIService = GetObject _
> ("winmgmts:\\" & strComputer & "\root\cimv2")
> Set colItems = objWMIService.ExecQuery _
> ("Select * From Win32_OperatingSystem")
> For Each objItem in ColItems
> HOW TO MAKE AN EXE RUN HERE???
> Next
>
> Next
>
> What would be the command to make an exe run on the target computer?
.
Re: How to change the working directory of application launched from a script? ... The problem is that I need to launch...>ShellExecute method with a Working Directory parameter: ... >To close the command prompt after launch of myprog.exe, ... >torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ... (microsoft.public.scripting.wsh)
Re: How to change the working directory of application launched from a script? ...ShellExecute method with a Working Directory parameter: ... To close the command prompt after launch of myprog.exe, ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ... (microsoft.public.scripting.wsh)
Re: SMS Installer Open File Security Warning ... > I've been doing this procedure for every patch I've been downloading form ... >> I'm simply doing an execute program script item on just the patch ... I'm using SMS Installer scripting to ... I also make sure to launch the ... (microsoft.public.sms.installer)
Exec vs. Run ... I'm pretty new to scripting in general and I'm wondering if someone can help me understand why something doesn't work. ... I've got a script that launches 7-zip, archives a bunch of files, then copies the archive to a removable disk. ... I originally wrote it using the Exec method to launch 7-zip. ... This worked great when I tested it, but in the real world I discovered that 7-zip would launch, the archive file would grow to exactly 2MB, and then 7-zip would appear to hang. ... (microsoft.public.scripting.wsh)
Re: launch batch file when program launches ... > launches I want it to run a batch file.... This script will launch calc.exe when notepad.exe is started. ... ' command to launch when strProcessName is started. ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ... (microsoft.public.win2000.general)