.net - what's the UNC path for local computer from a remote machine? -
i writing small utility program in ironpython install applications on remote machine using managementclass uses wmi.
now, script install application on machine_b machine_a, works fine long have msi file on local drive of target machine (machine_b, in case). want able same thing .msi file being on host (machine_a) machine.
network_scope = r"\\%machine_b\root\cimv2" scope = managementscope(network_scope, options) scope.connect() mp = managementpath("win32_product") ogo = objectgetoptions() mc = managementclass(scope, mp, ogo) inparams = mc.getmethodparameters ("install") inparams["packagelocation"] = r"c:\installs\python-3.1.1.msi" inparams["allusers"] = true retval = mc.invokemethod ("install", inparams, none) print retval ["returnvalue"].tostring()
problem :
[machine a] --- running script, , want host .msi file
[machine b] --- want install application
so, how can define unc path local machine ? inparams["packagelocation"] = ??
why not have script copy file administrative share c$ of target machine, optionally delete when done? installing local .msi faster over-the-network reads of .msi database continually.
Comments
Post a Comment