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

  FORUM HardWare.fr
  Programmation
  VB/VBA/VBS

  erreur vb

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

erreur vb

n°1021911
ste29
Posté le 23-03-2005 à 12:00:33  profilanswer
 

bonjour,
 
j'ai besoin d'aide sur ce script
message erreur  
 
erreur : type icompatible 'regexists'
code 800A000D
 
im WSHShell  
Set WSHShell = wscript.CreateObject("wscript.Shell" )  
 
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://olive", "REG_SZ"  
WSHShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\WUStatusServer", "http://olive", "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
MsgBox "La clé n'existe pas."
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
MsgBox "La clé n'existe pas."
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
ste29

mood
Publicité
Posté le 23-03-2005 à 12:00:33  profilanswer
 


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  VB/VBA/VBS

  erreur vb

 

Sujets relatifs
erreur JCombobox ?[Delphi + MySQL] Erreur E_FAIL, comment contourner ?
Comment interpreter cette erreur en java?Erreur KeycodeV2.dll
Erreur d'exécution inconnueerreur
erreur: ArrayIndexOutOfBoundsException[Delphi] idhttp : erreur ...
Encore une erreur 500Problème de LoadLibrary (erreur 2)
Plus de sujets relatifs à : erreur vb


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR