English 中文(简体)
联合国计算机从遥远的机器进入当地计算机的道路是什么?
原标题:what s the UNC path for local computer from a remote machine?

我正在铁蓬撰写一个小型水电方案,以安装使用WMI的遥控机器。

现在,只要在目标机器(Machine_B)的当地驱动力上有 m子,该笔文字就安装了机器-A的机器。 我希望能够用正文把档案放在人质(Machine_A)机器上。

network_scope = r"\%Machine_B
ootcimv2" 
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:installspython-3.1.1.msi"
inParams["AllUsers"] = True
retVal = mc.InvokeMethod ("Install", inParams, None)
print retVal ["ReturnValue"].ToString() 

<><>PROBLEM>:

[Machine A] --- Where I am running the script, and want to host the .msi file
[Machine B] --- where I want to install the application

So, How can I define the UNC path for local machine ? what will be inParams["PackageLocation"] = ??

最佳回答

为什么没有你的文件复印件给行政部门。 指标机器的元件,然后在使用时选择性删除? 在当地安装的电离层速度大大超过Mmsi数据库的超联网。

问题回答

暂无回答




相关问题
Manually implementing high performance algorithms in .NET

As a learning experience I recently tried implementing Quicksort with 3 way partitioning in C#. Apart from needing to add an extra range check on the left/right variables before the recursive call, ...

Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How do I compare two decimals to 10 decimal places?

I m using decimal type (.net), and I want to see if two numbers are equal. But I only want to be accurate to 10 decimal places. For example take these three numbers. I want them all to be equal. 0....

Exception practices when creating a SynchronizationContext?

I m creating an STA version of the SynchronizationContext for use in Windows Workflow 4.0. I m wondering what to do about exceptions when Post-ing callbacks. The SynchronizationContext can be used ...

Show running instance in single instance application

I am building an application with C#. I managed to turn this into a single instance application by checking if the same process is already running. Process[] pname = Process.GetProcessesByName("...

How to combine DataTrigger and EventTrigger?

NOTE I have asked the related question (with an accepted answer): How to combine DataTrigger and Trigger? I think I need to combine an EventTrigger and a DataTrigger to achieve what I m after: when ...

热门标签