Type de démmarage du service Schedule = "automatique"
bonjour tt l'monde !
voici mon script :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| Dim objFSO, objWMIService, objService, colServiceList
Dim objReseau, Ordinateur
Dim Reponse
Set objReseau = CreateObject("WScript.Network")
Ordinateur = LCase(objReseau.ComputerName)
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objWMIService = GetObject("winmgmts:" & _
"{impersonationLevel=impersonate}!\\" & Ordinateur & "\root\cimv2")
Set colServiceList = objWMIService.ExecQuery _
("Select * from Win32_Service where Name='Schedule'")
For Each objService In colServiceList
If (objService.Name = "Schedule") Then
Reponse = objService.StartService()
End If
Next
Set objFSO = Nothing
Set objReseau = Nothing
WScript.Quit |
Ce script démmarre le service windows "Schedule" ou le plannificateur de tâches si vous preferez (panneau de config/outils d'admin/services)
C'est bien , mais malheuresement insufisant !
j'aimerais egalement qu'il puisse le configurer et mettre la valeur "Type de demmarrage" à " automatique"
Merci pour votre aide