"
objet="Win32_Process"
Set System = GetObject("winmgmts:" & objet)
n=0
ncol=3
dim prop()
for each Property in System.Properties_
AddProp Property.Name
next
' Ajout des méthodes GetOwner et GetOwnerSid"
AddProp "GetOwner"
AddProp "GetOwnerSid"
r=ncol-(n mod ncol)
If r<>ncol Then
For i = 1 To r
ts.writeline "
"
Next
ts.writeline ""
end if
ts.writeline "
"
WriteHTMLBottom "Afficher","Fermer"
If isParam Then tParam.Close
RunIE 600,600,true
DisplayIE=false
DisplayExcel=false
DisplayNotepad=false
if oIE.Document.processlistForm.IE.Checked then DisplayIE=true
if oIE.Document.processlistForm.Excel.Checked then DisplayExcel=true
if oIE.Document.processlistForm.Notepad.Checked then DisplayNotepad=true
Set tParam = fso.CreateTextFile(ficparam, True)
' Utilisation de la fonction execute afin de créer dynamiquement
' des commandes faisant intervenir des noms de champs variables
dim f(), res()
redim f(n), res(n)
lmax=0
for i = 0 to n-1
f(i) = "function testparam() " & vbcrlf
f(i) = f(i) & "testparam=0" & vbcrlf
f(i) = f(i) & "if oIE.Document.processlistForm.param" & i &".Checked then testparam=1" & vbcrlf
f(i) = f(i) & "end function" & vbcrlf
execute f(i)
res(i)=testparam()
state=""
If res(i)=1 Then
state="Checked"
l=len(prop(i))
If lmaxListe des processus (" & date & " " & time & ") "
ts.writeline "
"
ts.writeline "
"
first=true
nl=2
nc=0
ts.writeline "
Terminer
"
For i= 0 To n-1
If res(i)=1 Then
If DisplayNotepad then
If not first Then tprint.write chr(9) else first=false
tprint.write prop(i)
end if
nc=nc+1
If DisplayExcel Then objXL.Cells(nl,nc).Value = prop(i)
comment=""
If lcase(prop(i))="executablepath" Then
comment=" Cliquer sur un lien pour afficher le fichier dans l'explorateur"
end if
ts.writeline "
" & prop(i) & comment & "
"
End If
Next
ts.writeline "
"
If DisplayNotepad Then tprint.WriteBlankLines(2)
Set System=GetObject ("winmgmts:{impersonationLevel=impersonate}!//" & Computer).InstancesOf(objet)
nl=2
nc=0
nproc=0
dim ProcState(),ProcNum()
for each Process in System
nl=nl+1
first=true
SetKill Process.Handle
ts.writeline "
"
If DisplayNotepad Then tprint.writeline ""
next
If DisplayExcel Then
objXL.Rows("2:2").Select
objXL.Selection.Font.Bold = True
d1=int((nc-1)/26)
d2=((nc-1) mod 26)
If d1=0 Then l1max="" else l1max=chr(Asc("A")+d1-1)
l2max=chr(Asc("A")+d2)
objXL.Columns("A:" & l1max & l2max).Select
objXL.Selection.Columns.AutoFit
objXL.Rows("1:1").Select
objXL.Selection.Font.Bold = True
objXL.Selection.Font.Size = 12
end if
ts.writeline "
"
If DisplayNotepad Then
tprint.close
commande=shell.ExpandEnvironmentStrings("%windir%\notepad.exe " & chr(34) & ficprint & chr(34))
shell.Run commande, 1
end if
If DisplayIE Then
WriteHTMLBottom "","Fermer"
RunIE 600,400,false
End If
Wscript.quit
'------------------------------------------------------------
Function FormatStr(ch,lmax)
l=len(ch)
If l"
ts.writeline ""
ts.writeline "" & Titre & ""
ts.writeline ""
ts.writeline ""
ts.writeline ""
ts.writeline ""
ts.writeline ""
ts.writeline ""
ts.writeline "