Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Launch Two Applications. Wait Until One Program Ends and Then Close the OtherContent of Launch Two Applications. Wait Until One Program Ends and Then Close the Other.vbsMD5 Hash: BCFCEE8FD82A862DA6194EA5BCB1DC26 |
||
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2:Win32_Process") errResult = objWMIService.Create("calc.exe", null, null, intCalcID) errResult = objWMIService.Create("notepad.exe", null, null, intNotepadID) Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colProcesses = objWMIService.ExecNotificationQuery _ ("Select * From __InstanceDeletionEvent " _ & "Within 1 Where TargetInstance ISA 'Win32_Process'") Do Until i = 999 Set objProcess = colProcesses.NextEvent If objProcess.TargetInstance.ProcessID = intCalcID Then Exit Do End If Loop Set colProcesses = objWMIService.ExecQuery _ ("Select * from Win32_Process Where ProcessID = " & intNotepadID) For Each objProcess in colProcesses objProcess.Terminate() Next | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |