[[FrontPage]]

3_ProcessStart_r2.vbs

--------------------------------------------------------------------------------
 
 ‘#######################################################
 ‘プロセスを起動します。あくまでもプロセスです。
 ‘#######################################################
 Set objFSO = CreateObject("Scripting.FileSystemObject")
 Set objFile = objFSO.OpenTextFile(”.\Addresses.txt")
 
 Do Until objFile.AtEndOfStream
 
     strComputer = objFile.ReadLine
 
     Set objWMIService = GetObject("winmgmts:\\” & strComputer & “\root\cimv2:Win32_Process")
     objWMIService.Create “C:\WINDOWS\system32\rundll32.exe C:\WINDOWS\system32\muweb.dll,LaunchMUSite”, null, null, intProcessID
     Set objWMIService = GetObject("winmgmts:\\” & strComputer & “\root\cimv2″) 
     Set colMonitoredProcesses = objWMIService.ExecNotificationQuery _ 
     ("Select * From __InstanceDeletionEvent Within 1 Where TargetInstance ISA ‘Win32_Process’")
 
     Do Until i = 1
         Set objLatestProcess = colMonitoredProcesses.NextEvent 
         If objLatestProcess.TargetInstance.ProcessID = intProcessID Then 
         i = 1
         End If
 
     Loop 
     
     Wscript.echo strComputer & “終了しました。”
 
 Loop
 --------------------------------------------------------------------------------


トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS