SUPINFO International University

SUPINFO Institute of Information Technology
Laboratoire Microsoft




Trouver le ProcessID associé à un fichier batch.

Accueil > Script > maintenance > Trouver le ProcessID associé à un fichier batch.

Trouver le ProcessID associé à un fichier batch.

Par Ismaël LIMBADA, LABORATOIRE SUPINFO DES TECHNOLOGIES MICROSOFT
Publiée le 27/06/2006 vers 10h.

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


Proposer un script

Notre avis :

Votre avis :

Réactions :
0

Votants :
1

Visites :
7135

1
2
3
4
5

Scripts Windows Suivant :

Lister les fichiers sans extension



Retrouvez ci-dessous les autres sections du Laboratoire Microsoft