Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Find  the  Process  ID  Associated  with  a  Batch  File  

 Content of Find the Process ID Associated with a Batch File.vbs
MD5 Hash: ACC9DB12F4A02C9A21FCC0E4A30C67D8
strComputer = "."

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery("Select * From Win32_Process")

For Each objItem in colItems
If InStr(objItem.CommandLine, ".bat") Or InStr(objItem.CommandLine, ".cmd") Then
Wscript.Echo "Batch file: " & objItem.CommandLine
Wscript.Echo "Process ID: " & objItem.ProcessID
End If
Next



   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a