Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Remote Install

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,36380
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Remote Install
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 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
 
 
Post #: 1
 
 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

(in reply to awe3s)
 
 
Post #: 2
 
 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

(in reply to kirrilian)
 
 
Post #: 3
 
 RE: Remote Install - 7/21/2006 1:12:06 AM   
  awe3s

 

Posts: 21
Score: 0
Joined: 4/20/2006
Status: offline
Thanks kirrilian, I will try psexec and play around with it.

@ gdewrance thanks for you input, your code below will install the application on the local machine. I already have this solution in place. What I want is to install an application to a remote machine i.e. run the script from machine A and install the apps on machine B where as the executables are on a shared server. Thanks anyway

(in reply to gdewrance)
 
 
Post #: 4
 
 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

(in reply to awe3s)
 
 
Post #: 5
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Remote Install Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts