davidhhuan

代码如下,注意修改红色部分

do 
Dim Shell
Set Shell=WScript.CreateObject("WScript.Shell")
dim OK,oShell 
OK=False 
set bag=getobject("winmgmts:\\.\root\cimv2") 
set pipe=bag.execquery("select * from win32_process where name=\'Portal.exe\'") 
For Each id In pipe 
OK = True 
Next 
If not OK Then 
Shell.Run "e:\Portal.exe"
WScript.Sleep 10000 
Shell.SendKeys "{ENTER}"
end if 
WScript.sleep 60000 
loop

分类:

技术点:

相关文章: