dim objwbemlocator
dim objwmiservice
dim objprocess
dim intprocessid
dim objstartup
dim objshell
set objshell =createobject("wscript.shell")
objshell.run "cmd /c net use \\192.168.116.205\ipc$ "123456" /user:"domain\username""
set objwbemlocator=createobject("wbemscripting.swbemlocator")
set objwmiservice = objwbemlocator.connectserver("192.168.116.205","root\cimv2","domainname\username","123456")
set objstartup =objwmiservice.get("win32_processstartup")
set objconfig =objstartup.spawninstance_
objconfig.showwindow=9
objconfig.priorityclass=64
set objprocess = objwmiservice.get("win32_process")
objprocess.create("wscrip.exe c:\target.vbs","c:\windows\system32",objconfig,intprocessid)
执行结果,远程计算机192.168.116.205新增了wscript.exe进程,但目标vbs未正真执行,求懂的行家帮忙,谢谢。
dim objwmiservice
dim objprocess
dim intprocessid
dim objstartup
dim objshell
set objshell =createobject("wscript.shell")
objshell.run "cmd /c net use \\192.168.116.205\ipc$ "123456" /user:"domain\username""
set objwbemlocator=createobject("wbemscripting.swbemlocator")
set objwmiservice = objwbemlocator.connectserver("192.168.116.205","root\cimv2","domainname\username","123456")
set objstartup =objwmiservice.get("win32_processstartup")
set objconfig =objstartup.spawninstance_
objconfig.showwindow=9
objconfig.priorityclass=64
set objprocess = objwmiservice.get("win32_process")
objprocess.create("wscrip.exe c:\target.vbs","c:\windows\system32",objconfig,intprocessid)
执行结果,远程计算机192.168.116.205新增了wscript.exe进程,但目标vbs未正真执行,求懂的行家帮忙,谢谢。