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)
posted @ 2024-01-24 13:12  Naihe\  阅读(76)  评论(0编辑  收藏  举报
// 音乐播放器