0
import wmi, time
ip = 'xx.xx.xx.xxx'
username = "XXXXXXX"
password = "XXXXXXX!"
SW_SHOWNORMAL = 1
from socket import *
print "Establishing connection to %s" %ip
c = wmi.WMI(ip, user=username, password=password)
process_startup = c.Win32_ProcessStartup.new()
process_startup.ShowWindow = SW_SHOWNORMAL
process_id, result = c.Win32_Process.Create
(CommandLine="Notepad.exe",ProcessStartupInformation=process_startup)
if result == 0:
print "Process started successfully: %d" % process_id
else:
raise RuntimeError, "Problem creating process: %d" % result
請幫助:如何使用域憑據連接爲我的系統是在域如何連接到遠程計算機通過提供使用Python腳本WMI連接DOMIAN憑據
謝謝。我能夠成功地連接到電腦**但我現在面臨的問題是過程不是交互式的。我可以c處理器「Notepad.exe」在任務管理器中運行,但不是交互式(可見:記事本未啓動)** – san