Lister tous les processus avec leurs chemins en ligne de commande
:salut:
je veux lister tous les processus avec leurs chemeins en ligne de commande comme ceci :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| Set fso = CreateObject("Scripting.FileSystemObject")
Set sho = CreateObject( "Wscript.Shell" )
NomFichierLog="Processus.txt"
temp = sho.ExpandEnvironmentStrings("%temp%")
PathNomFichierLog = temp & "\" & NomFichierLog
Set OutPut = fso.CreateTextFile(temp & "\" & NomFichierLog,1)
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process")
For Each objProcess in colProcessList
MsgBox objProcess.Name
msgbox Mid(objProcess.CommandLine,InStr(objProcess.CommandLine,""" """) + 2)
Next |
mais hélas j'ai cette erreur
Citation:
Utilisation non autorisé de Null Dans la ligne 17
Alors je sollicite votre aide :merci: