Bonjour,
En VBA, comment peut on afficher les services qui tournent sur un poste sous
Windows XP?
Merci d'avance pour votre aide.
--
@+
HD
Bonjour,
En VBA, comment peut on afficher les services qui tournent sur un poste sous
Windows XP?
Merci d'avance pour votre aide.
--
@+
HD
Bonjour,
En VBA, comment peut on afficher les services qui tournent sur un poste sous
Windows XP?
Merci d'avance pour votre aide.
--
@+
HD
Bonjour,
En VBA, comment peut on afficher les services qui tournent sur un poste sous
Windows XP?
Merci d'avance pour votre aide.
--
@+
HD
Bonjour,
En VBA, comment peut on afficher les services qui tournent sur un poste sous
Windows XP?
Merci d'avance pour votre aide.
--
@+
HD
Bonjour,
En VBA, comment peut on afficher les services qui tournent sur un poste sous
Windows XP?
Merci d'avance pour votre aide.
--
@+
HD
Bonjour,
Un script tiré du Technet Script Center
(http://www.microsoft.com/technet/scriptcenter) et adapté en VBA (renvoie les
services actifs dans une feuille de calcul d'un nouveau classeur) :
'================== > Sub testServices()
Set objIdDictionary = CreateObject("Scripting.Dictionary")
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!" & strComputer & "rootcimv2")
Set colServices = objWMIService.ExecQuery _
("Select * from Win32_Service Where State <> 'Stopped'")
For Each objService In colServices
If objIdDictionary.Exists(objService.ProcessID) Then
Else
objIdDictionary.Add objService.ProcessID, objService.ProcessID
End If
Next
Workbooks.Add
colProcessIDs = objIdDictionary.Items
For i = 0 To objIdDictionary.Count - 1
Set colServices = objWMIService.ExecQuery _
("Select * from Win32_Service Where ProcessID = '" & _
colProcessIDs(i) & "'")
For Each objService In colServices
j = j + 1
Cells(j, "A").Value = "Service : " & objService.DisplayName
Next
Next
End Sub
'================== >
FS
--
Frédéric Sigonneau [MVP Excel - né un sans-culottide]
Gestions de temps, VBA pour Excel :
http://perso.wanadoo.fr/frederic.sigonneau
Si votre question sur Excel est urgente, évitez ma bal !
Bonjour,
En VBA, comment peut on afficher les services qui tournent sur un poste sous
Windows XP?
Merci d'avance pour votre aide.
--
@+
HD
Bonjour,
Un script tiré du Technet Script Center
(http://www.microsoft.com/technet/scriptcenter) et adapté en VBA (renvoie les
services actifs dans une feuille de calcul d'un nouveau classeur) :
'================== > Sub testServices()
Set objIdDictionary = CreateObject("Scripting.Dictionary")
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\" & strComputer & "rootcimv2")
Set colServices = objWMIService.ExecQuery _
("Select * from Win32_Service Where State <> 'Stopped'")
For Each objService In colServices
If objIdDictionary.Exists(objService.ProcessID) Then
Else
objIdDictionary.Add objService.ProcessID, objService.ProcessID
End If
Next
Workbooks.Add
colProcessIDs = objIdDictionary.Items
For i = 0 To objIdDictionary.Count - 1
Set colServices = objWMIService.ExecQuery _
("Select * from Win32_Service Where ProcessID = '" & _
colProcessIDs(i) & "'")
For Each objService In colServices
j = j + 1
Cells(j, "A").Value = "Service : " & objService.DisplayName
Next
Next
End Sub
'================== >
FS
--
Frédéric Sigonneau [MVP Excel - né un sans-culottide]
Gestions de temps, VBA pour Excel :
http://perso.wanadoo.fr/frederic.sigonneau
Si votre question sur Excel est urgente, évitez ma bal !
Bonjour,
En VBA, comment peut on afficher les services qui tournent sur un poste sous
Windows XP?
Merci d'avance pour votre aide.
--
@+
HD
Bonjour,
Un script tiré du Technet Script Center
(http://www.microsoft.com/technet/scriptcenter) et adapté en VBA (renvoie les
services actifs dans une feuille de calcul d'un nouveau classeur) :
'================== > Sub testServices()
Set objIdDictionary = CreateObject("Scripting.Dictionary")
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!" & strComputer & "rootcimv2")
Set colServices = objWMIService.ExecQuery _
("Select * from Win32_Service Where State <> 'Stopped'")
For Each objService In colServices
If objIdDictionary.Exists(objService.ProcessID) Then
Else
objIdDictionary.Add objService.ProcessID, objService.ProcessID
End If
Next
Workbooks.Add
colProcessIDs = objIdDictionary.Items
For i = 0 To objIdDictionary.Count - 1
Set colServices = objWMIService.ExecQuery _
("Select * from Win32_Service Where ProcessID = '" & _
colProcessIDs(i) & "'")
For Each objService In colServices
j = j + 1
Cells(j, "A").Value = "Service : " & objService.DisplayName
Next
Next
End Sub
'================== >
FS
--
Frédéric Sigonneau [MVP Excel - né un sans-culottide]
Gestions de temps, VBA pour Excel :
http://perso.wanadoo.fr/frederic.sigonneau
Si votre question sur Excel est urgente, évitez ma bal !
Bonjour,
En VBA, comment peut on afficher les services qui tournent sur un poste sous
Windows XP?
Merci d'avance pour votre aide.
--
@+
HD
-----Message d'origine-----
Bonjour,
Un script tiré du Technet Script Center
(http://www.microsoft.com/technet/scriptcenter) et adapté
en VBA (renvoie les
services actifs dans une feuille de calcul d'un nouveau
classeur) :
'===================
Sub testServices()
Set objIdDictionary = CreateObject
("Scripting.Dictionary")
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!" & strComputer
& "rootcimv2")
Set colServices = objWMIService.ExecQuery _
("Select * from Win32_Service Where State
<> 'Stopped'")
For Each objService In colServices
If objIdDictionary.Exists(objService.ProcessID) Then
Else
objIdDictionary.Add objService.ProcessID,
objService.ProcessID
End If
Next
Workbooks.Add
colProcessIDs = objIdDictionary.Items
For i = 0 To objIdDictionary.Count - 1
Set colServices = objWMIService.ExecQuery _
("Select * from Win32_Service Where ProcessID
= '" & _
colProcessIDs(i) & "'")
For Each objService In colServices
j = j + 1
Cells(j, "A").Value = "Service : " &
objService.DisplayName
Next
Next
End Sub
'===================
FS
--
Frédéric Sigonneau [MVP Excel - né un sans-culottide]
Gestions de temps, VBA pour Excel :
http://perso.wanadoo.fr/frederic.sigonneau
Si votre question sur Excel est urgente, évitez ma bal !
Bonjour,
En VBA, comment peut on afficher les services qui
tournent sur un poste sous
Windows XP?
Merci d'avance pour votre aide.
--
@+
HD
.
-----Message d'origine-----
Bonjour,
Un script tiré du Technet Script Center
(http://www.microsoft.com/technet/scriptcenter) et adapté
en VBA (renvoie les
services actifs dans une feuille de calcul d'un nouveau
classeur) :
'===================
Sub testServices()
Set objIdDictionary = CreateObject
("Scripting.Dictionary")
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\" & strComputer
& "rootcimv2")
Set colServices = objWMIService.ExecQuery _
("Select * from Win32_Service Where State
<> 'Stopped'")
For Each objService In colServices
If objIdDictionary.Exists(objService.ProcessID) Then
Else
objIdDictionary.Add objService.ProcessID,
objService.ProcessID
End If
Next
Workbooks.Add
colProcessIDs = objIdDictionary.Items
For i = 0 To objIdDictionary.Count - 1
Set colServices = objWMIService.ExecQuery _
("Select * from Win32_Service Where ProcessID
= '" & _
colProcessIDs(i) & "'")
For Each objService In colServices
j = j + 1
Cells(j, "A").Value = "Service : " &
objService.DisplayName
Next
Next
End Sub
'===================
FS
--
Frédéric Sigonneau [MVP Excel - né un sans-culottide]
Gestions de temps, VBA pour Excel :
http://perso.wanadoo.fr/frederic.sigonneau
Si votre question sur Excel est urgente, évitez ma bal !
Bonjour,
En VBA, comment peut on afficher les services qui
tournent sur un poste sous
Windows XP?
Merci d'avance pour votre aide.
--
@+
HD
.
-----Message d'origine-----
Bonjour,
Un script tiré du Technet Script Center
(http://www.microsoft.com/technet/scriptcenter) et adapté
en VBA (renvoie les
services actifs dans une feuille de calcul d'un nouveau
classeur) :
'===================
Sub testServices()
Set objIdDictionary = CreateObject
("Scripting.Dictionary")
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!" & strComputer
& "rootcimv2")
Set colServices = objWMIService.ExecQuery _
("Select * from Win32_Service Where State
<> 'Stopped'")
For Each objService In colServices
If objIdDictionary.Exists(objService.ProcessID) Then
Else
objIdDictionary.Add objService.ProcessID,
objService.ProcessID
End If
Next
Workbooks.Add
colProcessIDs = objIdDictionary.Items
For i = 0 To objIdDictionary.Count - 1
Set colServices = objWMIService.ExecQuery _
("Select * from Win32_Service Where ProcessID
= '" & _
colProcessIDs(i) & "'")
For Each objService In colServices
j = j + 1
Cells(j, "A").Value = "Service : " &
objService.DisplayName
Next
Next
End Sub
'===================
FS
--
Frédéric Sigonneau [MVP Excel - né un sans-culottide]
Gestions de temps, VBA pour Excel :
http://perso.wanadoo.fr/frederic.sigonneau
Si votre question sur Excel est urgente, évitez ma bal !
Bonjour,
En VBA, comment peut on afficher les services qui
tournent sur un poste sous
Windows XP?
Merci d'avance pour votre aide.
--
@+
HD
.
Salut Fred !!! (*)
Ma curiosité est éveillée par les résultats de ce script.
quelle en est l'utilité ? au niveau des macros EXCEL,
exemples d'utilisation ???
Question ouverte....
;-)))
@+
(*) CTP-----Message d'origine-----
Bonjour,
Un script tiré du Technet Script Center
(http://www.microsoft.com/technet/scriptcenter) et adapté
en VBA (renvoie lesservices actifs dans une feuille de calcul d'un nouveau
classeur) :
'================== > >Sub testServices()
Set objIdDictionary = CreateObject
("Scripting.Dictionary")strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!" & strComputer
& "rootcimv2")Set colServices = objWMIService.ExecQuery _
("Select * from Win32_Service Where State
<> 'Stopped'")For Each objService In colServices
If objIdDictionary.Exists(objService.ProcessID) Then
Else
objIdDictionary.Add objService.ProcessID,
objService.ProcessIDEnd If
Next
Workbooks.Add
colProcessIDs = objIdDictionary.Items
For i = 0 To objIdDictionary.Count - 1
Set colServices = objWMIService.ExecQuery _
("Select * from Win32_Service Where ProcessID
= '" & _colProcessIDs(i) & "'")
For Each objService In colServices
j = j + 1
Cells(j, "A").Value = "Service : " &
objService.DisplayNameNext
Next
End Sub
'================== > >
FS
--
Frédéric Sigonneau [MVP Excel - né un sans-culottide]
Gestions de temps, VBA pour Excel :
http://perso.wanadoo.fr/frederic.sigonneau
Si votre question sur Excel est urgente, évitez ma bal !
Bonjour,
En VBA, comment peut on afficher les services qui
tournent sur un poste sousWindows XP?
Merci d'avance pour votre aide.
--
@+
HD
.
Salut Fred !!! (*)
Ma curiosité est éveillée par les résultats de ce script.
quelle en est l'utilité ? au niveau des macros EXCEL,
exemples d'utilisation ???
Question ouverte....
;-)))
@+
(*) CTP
-----Message d'origine-----
Bonjour,
Un script tiré du Technet Script Center
(http://www.microsoft.com/technet/scriptcenter) et adapté
en VBA (renvoie les
services actifs dans une feuille de calcul d'un nouveau
classeur) :
'================== > >Sub testServices()
Set objIdDictionary = CreateObject
("Scripting.Dictionary")
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\" & strComputer
& "rootcimv2")
Set colServices = objWMIService.ExecQuery _
("Select * from Win32_Service Where State
<> 'Stopped'")
For Each objService In colServices
If objIdDictionary.Exists(objService.ProcessID) Then
Else
objIdDictionary.Add objService.ProcessID,
objService.ProcessID
End If
Next
Workbooks.Add
colProcessIDs = objIdDictionary.Items
For i = 0 To objIdDictionary.Count - 1
Set colServices = objWMIService.ExecQuery _
("Select * from Win32_Service Where ProcessID
= '" & _
colProcessIDs(i) & "'")
For Each objService In colServices
j = j + 1
Cells(j, "A").Value = "Service : " &
objService.DisplayName
Next
Next
End Sub
'================== > >
FS
--
Frédéric Sigonneau [MVP Excel - né un sans-culottide]
Gestions de temps, VBA pour Excel :
http://perso.wanadoo.fr/frederic.sigonneau
Si votre question sur Excel est urgente, évitez ma bal !
Bonjour,
En VBA, comment peut on afficher les services qui
tournent sur un poste sous
Windows XP?
Merci d'avance pour votre aide.
--
@+
HD
.
Salut Fred !!! (*)
Ma curiosité est éveillée par les résultats de ce script.
quelle en est l'utilité ? au niveau des macros EXCEL,
exemples d'utilisation ???
Question ouverte....
;-)))
@+
(*) CTP-----Message d'origine-----
Bonjour,
Un script tiré du Technet Script Center
(http://www.microsoft.com/technet/scriptcenter) et adapté
en VBA (renvoie lesservices actifs dans une feuille de calcul d'un nouveau
classeur) :
'================== > >Sub testServices()
Set objIdDictionary = CreateObject
("Scripting.Dictionary")strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!" & strComputer
& "rootcimv2")Set colServices = objWMIService.ExecQuery _
("Select * from Win32_Service Where State
<> 'Stopped'")For Each objService In colServices
If objIdDictionary.Exists(objService.ProcessID) Then
Else
objIdDictionary.Add objService.ProcessID,
objService.ProcessIDEnd If
Next
Workbooks.Add
colProcessIDs = objIdDictionary.Items
For i = 0 To objIdDictionary.Count - 1
Set colServices = objWMIService.ExecQuery _
("Select * from Win32_Service Where ProcessID
= '" & _colProcessIDs(i) & "'")
For Each objService In colServices
j = j + 1
Cells(j, "A").Value = "Service : " &
objService.DisplayNameNext
Next
End Sub
'================== > >
FS
--
Frédéric Sigonneau [MVP Excel - né un sans-culottide]
Gestions de temps, VBA pour Excel :
http://perso.wanadoo.fr/frederic.sigonneau
Si votre question sur Excel est urgente, évitez ma bal !
Bonjour,
En VBA, comment peut on afficher les services qui
tournent sur un poste sousWindows XP?
Merci d'avance pour votre aide.
--
@+
HD
.
Il faudrait demander à HD ce qu'il compte en faire
Il faudrait demander à HD ce qu'il compte en faire
Il faudrait demander à HD ce qu'il compte en faire