Dim shell, fso, f
Set shell = WScript.CreateObject("WScript.Shell")
Set fso = WScript.CreateObject("Scripting.FileSystemObject")
Const ForWriting=2
'fichiers exécutables
key="HKEY_CLASSES_ROOT\exefile\shell\open\command\"
shell.RegWrite key,"""%1"" %*"
key="HKEY_LOCAL_MACHINE\Software\CLASSES\exefile\shell\open\command"
shell.RegWrite key,"""%1"" %*"
key="HKEY_CLASSES_ROOT\.exe"
shell.RegWrite key,"exefile"
'fichiers de registre
key="HKEY_CLASSES_ROOT\regfile\shell\open\command\"
shell.RegWrite key,"regedit.exe ""%1"""
'Economiseurs d ecran
key="HKEY_CLASSES_ROOT\scrfile\shell\open\command\"
shell.RegWrite key,"""%1"" /S"
key="HKEY_CLASSES_ROOT\scrfile\shell\config\command\"
shell.RegWrite key,"""%1"""
'raccourcis PIF
key="HKEY_CLASSES_ROOT\piffile\shell\open\command\"
shell.RegWrite key,"""%1"" %*"
'raccourcis CMD
key="HKEY_CLASSES_ROOT\cmdfile\shell\open\command\"
shell.RegWrite key,"""%1"" %*"
'raccourcis COM
key="HKEY_CLASSES_ROOT\comfile\shell\open\command\"
shell.RegWrite key,"""%1"" %*"
'fichier BAT
key="HKEY_CLASSES_ROOT\batfile\shell\open\command\"
shell.RegWrite key,"""%1"" %*"
'Réactivation des outils de registre
key="HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\System\"
shell.RegWrite key & "DisableRegistryTools", 0 ,"REG_DWORD"
key="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\"
shell.RegWrite key & "DisableRegistryTools", 0 ,"REG_DWORD"
key="HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\"
shell.RegWrite key & "DisableRegistryTools", 0 ,"REG_DWORD"
'Réactivation du bouton d arrêt
key="HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\"
shell.RegWrite key & "NoClose", 0 ,"REG_DWORD"
key="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\"
shell.RegWrite key & "NoClose", 0 ,"REG_DWORD"
key="HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\"
shell.RegWrite key & "NoClose", 0 ,"REG_DWORD"
'Réactivation du gestionnaire de tâches
key="HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\System\"
shell.RegWrite key & "DisableTaskMgr", 0 ,"REG_DWORD"
key="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\"
shell.RegWrite key & "DisableTaskMgr", 0 ,"REG_DWORD"
key="HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\"
shell.RegWrite key & "DisableTaskMgr", 0 ,"REG_DWORD"
'Ajout du 14/11/2005
'Cette clé n'a rien à faire là et empêche les exe de fonctionner
' HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.exe
'
'On utilise un REG (qu'on vient de réparer) car on ne peut pas utiliser
' regdelete sur une clé sans effacer son contenu
shell.PopUp "Une demande d'ajout au registre va apparaitre, veuillez cliquer sur [oui]", 3, "VirusBdrRepair", 64
tmpdir=shell.ExpandEnvironmentStrings("%temp%")
windir=shell.ExpandEnvironmentStrings("%windir%")
nomfic=tmpdir & "\tmp.reg"
' msgbox nomfic
set f = fso.OpenTextFile(nomfic, ForWriting , true)
f.writeline "REGEDIT4"
f.writeline " "
f.writeline "[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.exe]"
f.writeline " "
f.close
shell.run nomfic, 10 , 1
'effacer le tmp.reg
fso.DeleteFile nomfic, true
'fin
wscript.echo "Nettoyage des associations exe, scr, reg, pif, bat terminé." & vbcrlf & _
"Réactivation des outils de registre, du gestionnaire de tâches et du bouton d arrêt effectué"
Wscript.quit
as-tu cela?