python实现远程访问Windows桌面
Demo Code
strComputer = "."
objWMIService = win32com.client.Dispatch("WbemScripting.SWbemLocator")
print(objWMIService)
objSWbemServices = objWMIService.ConnectServer(strComputer,"user\pwd")
print(objSWbemServices)
colItems = objSWbemServices.ExecQuery("SELECT * FROM Win32_Process")
for objItem in colItems:
print(objItem.Caption)