展开全部
set ws = createobject("wscript.shell")
exe1="notepad.exe"
exe2 = "calc.exe"
check = false
while(true <> check )
check = isProcessExists(exe1)
wscript.sleep 10000
wend
ws.run exe2
Private Function isProcessExists(strExeName)
strComputer = "."
Set wbemServices = GetObject("winmgmts:\\" & strComputer)
Set wbemObjectSet = wbemServices.InstancesOf("Win32_Process")
For Each wbemObject In wbemObjectSet
namedata = wbemObject.Name
If strExeName = namedata Then
isProcessExists = true
End If
Next
End Function
'写完了,你把exe1里面放1.exe的路径,exe2里面放2.exe的路径
exe1="notepad.exe"
exe2 = "calc.exe"
check = false
while(true <> check )
check = isProcessExists(exe1)
wscript.sleep 10000
wend
ws.run exe2
Private Function isProcessExists(strExeName)
strComputer = "."
Set wbemServices = GetObject("winmgmts:\\" & strComputer)
Set wbemObjectSet = wbemServices.InstancesOf("Win32_Process")
For Each wbemObject In wbemObjectSet
namedata = wbemObject.Name
If strExeName = namedata Then
isProcessExists = true
End If
Next
End Function
'写完了,你把exe1里面放1.exe的路径,exe2里面放2.exe的路径
力控科技
2024-08-19 广告
2024-08-19 广告
ForceSCADA是力控科技信创产品的重要组成部分,具备完全自主知识产权,支持部署在Linux桌面版、服务器版、嵌入式等系统架构下。使用ForceSCADA可以搭建创新性高、扩展性佳、融合度强的SCADA平台,进而构建高效、智能化的监控中...
点击进入详情页
本回答由力控科技提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询