Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
3665 connectés 

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

SUS

n°1972218
ste29
Posté le 24-03-2005 à 12:24:22  profilanswer
 

bonjour,
 
j'utilise un script vbs pour que les postes clients aillent chercher les mises à jour sue notre serveur sus et ça fonctionne correctement
 
par contre elles ne s'installent pas automatiquement
il faut double clicker sur icône Windows update
 
comment faire pour que l'install se fasse aussi automatiquement ?
 
merci beaucoup
slts
ste29

mood
Publicité
Posté le 24-03-2005 à 12:24:22  profilanswer
 

n°1972272
com21
Modérateur
real men don't click
Posté le 24-03-2005 à 13:16:17  profilanswer
 

et ton script vbs il ressemble à quoi ? ;)
 
ça aiderait pour t'aider...
 
et puis tu aurais pu poster sur le topic sus : http://forum.hardware.fr/hardwaref [...] 8275-1.htm
 
!
 


---------------
Cherche geekette | Traquez vos billets d'€ | Don du sang | Don de moelle osseuse
n°1972287
ste29
Posté le 24-03-2005 à 13:22:08  profilanswer
 

désolé
voici mon script
 
Dim WSHShell  
Set WSHShell = wscript.CreateObject("wscript.Shell" )  
 
Function RegExists(value)
On Error Resume Next
Set WS = CreateObject("WScript.Shell" )
val = WS.RegRead(value)
If (Err.number = -2147024893) Or (Err.number = -2147024894) Then
RegExists = False
Else
RegExists = True
End If
End Function
 
 
WSHShell.Run "net stop wuauserv"  
Wscript.Sleep 10000  
 
 
WSHShell.RegWrite "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\wuauserv\start", 2, "REG_DWORD"  
Wscript.Sleep 5000  
 
WSHShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU\NoAutoUpdate", 0, "REG_DWORD"  
WSHShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU\AUOptions", 4, "REG_DWORD"  
WSHShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU\ScheduledInstallDay", 0, "REG_DWORD"  
 
WSHShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\ScheduledInstallTime", 8, "REG_DWORD"
 
WSHShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU\UseWUServer", 1, "REG_DWORD"  
WSHShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU\NoAutoRebootWithLoggedOnUsers", 1, "REG_DWORD"  
WSHShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU\RescheduleWaitTime", 1, "REG_DWORD"  
WSHShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\WUServer", "http://....", "REG_SZ"  
WSHShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\WUStatusServer", "http://....", "REG_SZ"  
 
If RegExists ("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\windowsupdate\auto update\LastWaitTimeout" ) Then
WSHShell.RegDelete "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\windowsupdate\auto update\LastWaitTimeout"
else
End If  
 
If RegExists ("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\windowsupdate\auto update\DetectionStartTime" ) Then
WSHShell.RegDelete "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\windowsupdate\auto update\DetectionStartTime"
else
End If
 
WSHShell.Run "net start wuauserv"  
Wscript.Sleep 10000  
 
 
strComputer = "."  
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2" )  
Set colRunningServices = objWMIService.ExecQuery ("Select * from Win32_Service" )  
For Each objService in colRunningServices  
 if objService.DisplayName = "Automatic Updates" then  
     if objService.State = "Stopped" then  
       wscript.echo "Automatic Updates a été configuré. Vous devez redémarrer l'ordinateur pour pour que les paramètres soient effectifs."  
     else  
       wscript.echo "Automatic Updates a été configuré."  
     end if  
 end if  
Next  
 
wscript.Quit(0)
 
merci
slts

n°1972311
com21
Modérateur
real men don't click
Posté le 24-03-2005 à 13:28:15  profilanswer
 
n°1973532
ste29
Posté le 25-03-2005 à 10:04:44  profilanswer
 

bonjour,
 
ça ne m'aide pas beaucoup
en fait je veux mettre dans mon script l'option 4 que l'on retrouve dans le modele d'administration
 
slts
stéphane


Aller à :
Ajouter une réponse
 

Sujets relatifs
Serveur SUSwindows SUS
SUS ... ca ne marche pas ... comprends pas !Serveur SUS
Tester un serveur SUSClient SUS vide
Pb mise à jour client GPO serveur SUSserveur SUS
Serveur SUSgpo sus
Plus de sujets relatifs à : SUS


Copyright © 1997-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)