Link to home
Start Free TrialLog in
Avatar of nokyplease
nokypleaseFlag for Hong Kong

asked on

how-to using WMIC to install an application with source files in network share?

Hi Experts,

I would like to know how to use wmic to perforce remote install with the installer package on a network share?

thanks.
Avatar of Meir Rivkin
Meir Rivkin
Flag of Israel image

if u have the path of the installer package in the remote machine u can use almost any script to perform the installation.
for instance:

powershell:
(Get-WMIObject -ComputerName <remote_machine> -List | Where-Object -FilterScript {$_.Name -eq "Win32_Product"}).Install(\\AppSrv\dsp\NewPackage.msi)

Open in new window

from http://powershell.com/cs/forums/p/1487/5518.aspx

vbs:
Set objService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objSoftware = objService.Get("Win32_Product")
objSoftware.Install("<windows_package.msi>,"SMSSITECODE=ABA DISABLESITEOPT=True DISABLECACHEOPT=True" , ALL_USERS)

Open in new window

from http://sites.google.com/site/assafmiron/ServerScripts/remoteinstall

batch:
you need to copy the installer package to the remote machine first then execute psexec, check this example: http://forum.sysinternals.com/psexec-and-remote-install_topic8575.html
Avatar of nokyplease

ASKER

i am able to install the software package (eg msi or exe) if it is on the remote machine. However, if the installer is on a network share, i am not able to do so.

is there anyway i can run a command on a remote machine and tell it to go to a network share (with UNC path \\<remote server>\blah\blah\blah.xxx) and execute the installer their?

thanks.
you got to copy the installer to the server first and then run the installer as u do now,  that would the trick
can i run the installer from a UNC location?

e.g, i am at client A and want to install a software to client B remotely and the software installer is in server C.

thanks.
ASKER CERTIFIED SOLUTION
Avatar of Meir Rivkin
Meir Rivkin
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial