Login | |
|
 |
Remote Install - 7/20/2006 8:09:57 AM
|
|
 |
|
| |
awe3s
Posts: 21
Score: 0
Joined: 4/20/2006
Status: offline
|
Hi guys, I hope someone might shed a light on the following, basically I want to run/install an application either an exe or a msi file remotely on a machine. I have experimented on different methods and the only way I could do it is to copy the excutable to the remote machine's C drive and then run a remote process, that works fine. Is it possible to run the executable from a network share, I tried the following but wouldn't work Set objProcess = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2:Win32_Process") errReturn = objProcess.Create("\\server\share\setup.exe", null, null, intProcessID) Simlarly: Set objProcess = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2:Win32_Process") errReturn = objProcess.Create("MSIEXEC.EXE /i \\server\share\install.msi TRANSFORMS=\\server\share\install.mst ALLUSERS=1 /qn /lieucmo+ c:\installFiles\~Install.log", null, null, intProcessID) If I change the unc path to the remote machine's c drive (where I copied the excutable) it works. I read that you may use NullSessionShare along with WMI but can't find examples or know how to do it. Any help in this is appreciated. Thanks
|
|
| |
|
|
|
 |
RE: Remote Install - 7/20/2006 3:50:00 PM
|
|
 |
|
| |
kirrilian
Posts: 628
Score: 3
Joined: 3/15/2005
From:
Status: offline
|
you might want to look into psexec for this, I'm pretty sure that you can do it with that.
_____________________________
Have you searched here ? VBScript Fundamentals My Site
|
|
| |
|
|
|
 |
RE: Remote Install - 7/21/2006 12:12:35 AM
|
|
 |
|
| |
gdewrance
Posts: 587
Score: 3
Joined: 3/16/2006
Status: offline
|
This would be for msi file. works for all my installs On Error Resume Next Dim Return, programpath, programname, windowspath, startmenupath, WshShell, WshNetwork programname = "NameOf Application" set objFSO = CreateObject("scripting.filesystemobject") Set WshShell = WScript.CreateObject("Wscript.Shell") Set WshNetwork = WScript.CreateObject("Wscript.Network") programpath = ("\\Server\Share\") '***Checks if NameOFApp is installed. If so, script jumps to completed message.*** If objFSO.FileExists("C:\Program Files\NameOfApp\NameofApp.exe")=false Then ' ***Run setup program*** Return = WshShell.Run("msiexec /q /i """ & programpath & "Adobe Reader 6.0.msi""",1,True) '/qb End If Set objFile = objFSO.CreateTextFile("C:\Rdr6-Upgd.txt") Set objFSO = nothing Set WshShell = nothing Set WshNetwork = nothing Set objFile = nothing
|
|
| |
|
|
|
 |
RE: Remote Install - 7/21/2006 1:17:38 AM
|
|
 |
|
| |
gdewrance
Posts: 587
Score: 3
Joined: 3/16/2006
Status: offline
|
I use this script through GPO and installs on 80 users from a server share
|
|
| |
|
|
|
|
|