views:

123

answers:

1

Hi, I modified this script from the net, which is suppose to install .exe applications for remote machines:

$m = Read-Host "Enter machine name"

$File = "c:\temp\office2007sp2-kb958194-fullfile-en-us.exe"

$product = [WMICLASS]"\$m\ROOT\CIMV2:win32_Process"

$product.Create($File)

When I run this script, I have noticed that this program promptly creates a process in the remote machine with the application name office2007sp2-kb958194-fullfile-en-us.exe. This can be checked in the task manager also. But other than that, there is no way to find out if this is getting installed in the remote machine or not. Is there a way to find out, if the installation is really happening? Or does this script actually works? Any help will be great!

Reagrds Arindam

A: 

Not a proper answer because I haven't tried remote process launching like that, but I have used psexec to launch processes on other machines.

If you are still having problems with your script you may want to check out ps_exec, it lets you execute processes on other machines as if it was your own. You can check the exit code of the process just like you would if you were executing the process locally.

It's offered as a free tool by microsoft: http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx

vfilby