Soyez le premier à donner votre avis sur cette source.
Vue 13 436 fois - Téléchargée 783 fois
'/////////////////////////////////////////////////////////////////////////////////////////////////////////////// ' ' OPTIMISATION DE LA BASE DE REGISTRE WINDOWS XP ' __________________________________ ' 'Version 1.0.2 'Développé par Bichwarrior 'Modifié le : 19/02/2004 ' ' '/////////////////////////////////////////////////////////////////////////////////////////////////////////////// Dim StrLog Dim Response '********************************************************************************************************* ' Appel à l'objet WScript.Shell ' Set WshShell = WScript.CreateObject("WScript.Shell") ' '********************************************************************************************************* '/////////////////////////////////////////////////////////////////////////////////////////////////////////////// '********************************************************************************************************* ' Fonction execute applis ' Function RunExe(StrPathKey) WshShell.Run(StrPathKey) End Function ' '********************************************************************************************************* '/////////////////////////////////////////////////////////////////////////////////////////////////////////////// '********************************************************************************************************* ' Fonction lecture d'une clé ' Function ReadKey(StrPathKey) ReadKey = WshShell.RegRead(StrPathKey) End Function ' '********************************************************************************************************* '/////////////////////////////////////////////////////////////////////////////////////////////////////////////// '********************************************************************************************************* ' Fonction delete d'une clé ' Function DeleteKey(StrPathKey) WshShell.RegDelete(StrPathKey) End Function ' '********************************************************************************************************* '/////////////////////////////////////////////////////////////////////////////////////////////////////////////// '********************************************************************************************************* ' Fonction modifier une clé ' Function WriteKey(StrPathKey,ValueKey,TypeKey) WshShell.RegWrite StrPathKey,ValueKey End Function ' '********************************************************************************************************* '/////////////////////////////////////////////////////////////////////////////////////////////////////////////// '********************************************************************************************************* ' Fonction Creer une clé ' Function CreateKey(StrPathKey,ValueKey,TypeKey) WshShell.RegWrite StrPathKey,ValueKey,TypeKey End Function ' '********************************************************************************************************* '/////////////////////////////////////////////////////////////////////////////////////////////////////////////// ' ' ' Optimisation de la base de registre ' '/////////////////////////////////////////////////////////////////////////////////////////////////////////////// '********************************************************************************************************* ' Fermer Windows 2000 et XP plus rapidement ' ' 1. Fermer les applications WriteKey "HKEY_CURRENT_USER\Control Panel\Desktop\AutoEndTasks","1","REG_SZ" ' 2. Fermez les services WriteKey "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\WaitToKillServiceTimeout","2000","REG_SZ" ' StrLog = "1. - Fermeture de windows plus rapide" & vbcrlf & _ "Fermer les applications : " & ReadKey("HKEY_CURRENT_USER\Control Panel\Desktop\AutoEndTasks") & vbcrlf & _ "Fermer les services au bout de : " & ReadKey("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\WaitToKillServiceTimeout") & " ms" & vbcrlf & _ "---------------------------------------" '********************************************************************************************************* '********************************************************************************************************* ' Nettoyage du fichier swap à la fermeture de windows Optimisation de la cache ' WriteKey "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\ClearPageFileAtShutdown","1","REG_DWORD" WriteKey "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\DisablePagingExecutive","1","REG_DWORD" WriteKey "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache","1","REG_DWORD" ' StrLog = strlog & vbcrlf & "2. - Netoyage du fichier SWAP à la fermeture et Optimisation de la cache" & vbcrlf & _ "---------------------------------------" '********************************************************************************************************* '********************************************************************************************************* ' Accélérer le menu démarrer ' WriteKey "HKEY_CURRENT_USER\Control Panel\Desktop\MenuShowDelay","0","REG_SZ" ' StrLog = strlog & vbcrlf & "3. - Accélération du menu démarrer" & vbcrlf & _ "---------------------------------------" '********************************************************************************************************* '********************************************************************************************************* ' Optimiser les performances de son disque dur NTFS ' CreateKey "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisableLastAccessUpdate",1,"REG_DWORD" ' StrLog = strlog & vbcrlf & "4. - Optimisation des performances de son disque dur NTFS " & vbcrlf & _ "---------------------------------------" '********************************************************************************************************* '********************************************************************************************************* ' Windows Update sans être enregistré ' WriteKey "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\RegDone","1","REG_SZ" ' StrLog = strlog & vbcrlf & "5. - Windows Update sans être enregistré" & vbcrlf & _ "---------------------------------------" '********************************************************************************************************* '********************************************************************************************************* ' Verrouiller le clavier numérique au démarrage ' WriteKey "HKEY_USERS\.DEFAULT\Control Panel\Keyboard\InitialKeyboardIndicators","2","REG_SZ" ' StrLog = strlog & vbcrlf & "6. - Verrouiller le clavier numérique au démarrage" & vbcrlf & _ "---------------------------------------" '********************************************************************************************************* '********************************************************************************************************* ' Mettre votre nom dans la barre des tâches ' 'WriteKey "HKEY_CURRENT_USER\Control Panel\international\s1159",InputBox("Votre Nom : ") ' 'StrLog = strlog & vbcrlf & "7. - Mettre votre nom dans la barre des tâches" & vbcrlf & _ ' "---------------------------------------" '********************************************************************************************************* '********************************************************************************************************* ' Style de l'ouverture de session ' Dim StrTemp Select Case InputBox("Pour le gris clair : 1" & vbcrlf & _ "Pour le vert olive : 2" & vbcrlf & _ "Pour le bleu d'origine : 3") Case 1 StrTemp = "Metallic" Case 2 StrTemp = "Homestead" Case 3 StrTemp = "NormalColor" End Select WriteKey "HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\ThemeManager\ColorName",StrTemp,"REG_DWORD" ' StrLog = strlog & vbcrlf & "8. - Style de l'ouverture de session" & vbcrlf & _ "---------------------------------------" '********************************************************************************************************* '********************************************************************************************************* ' Enlever mouchard de Windows ' RunExe "regsvr32.exe -u c:\windows\system32\regwizc.dll /s" StrLog = strlog & vbcrlf & "9. - Enlever mouchard de Windows " & vbcrlf & _ "---------------------------------------" '********************************************************************************************************* '********************************************************************************************************* ' Réduire le temps de transfert du disque dur ' RunExe "diskperf -n" StrLog = strlog & vbcrlf & "10. - Réduire le temps de transfert du disque dur " & vbcrlf & _ "---------------------------------------" '********************************************************************************************************* '********************************************************************************************************* ' Enlever les DLL de la mémoire ' CreateKey "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AlwaysUnloadDll",1,"REG_DWORD" ' StrLog = strlog & vbcrlf & "11. - Enlever les DLL de la mémoire " & vbcrlf & _ "---------------------------------------" '********************************************************************************************************* '********************************************************************************************************* ' Accélérez le démarrage de Windows XP ' WriteKey "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction\Enable","N","REG_SZ" StrLog =strlog & vbcrlf & "12. - Accélérez le démarrage de Windows XP" & vbcrlf & _ "---------------------------------------" '********************************************************************************************************* '********************************************************************************************************* ' Ajouter CMD dans le répertoire courant ' Response = Msgbox ("Souhaitez-vous ajouter un menu de commande MS-DOS dans le répertoire courant ?",vbYesNo,"MS-DOS Paramètres") If Response = vbYes then WriteKey "HKEY_CLASSES_ROOT\Directory\Shell\CMD\Command\","cmd.exe /k ""cd %1""","REG_SZ" StrLog = strlog & vbcrlf & "13. - Ajouter CMD dans le répertoire courant" & vbcrlf & _ "---------------------------------------" Else WriteKey "HKEY_CLASSES_ROOT\Directory\Shell\CMD\Command\","cmd.exe /k ""cd %L""","REG_SZ" StrLog = strlog & vbcrlf & "13. - Enlever CMD dans le répertoire courant" & vbcrlf & _ "---------------------------------------" end if '********************************************************************************************************* '********************************************************************************************************* ' Desactiver le partage administratif de Windows XP ' Response = MsgBox ("Souhaitez-vous désactiver les partages administratifs ?",vbYesNo,"Partages Administratifs") If Response = VbYes Then CreateKey "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\lanmanserver\parameters\AutoShareWks",0,"REG_DWORD" StrLog = strlog & vbcrlf & "14. - Desactiver le partage administratif de Windows XP" & vbcrlf & _ "---------------------------------------" Else CreateKey "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\lanmanserver\parameters\AutoShareWks",1,"REG_DWORD" StrLog = strlog & vbcrlf & "14. - Activer le partage administratif de Windows XP" & vbcrlf & _ "---------------------------------------" End If '********************************************************************************************************* MsgBox StrLog
9 mai 2004 à 18:52
a cause de lui ( je presume ) mon PC refuse carrement de booter : unmountable boot device
il veut plus installer win ( meme erreur ou sinon il voir pas partition vide et unknown => formatage ) alors qu'elle est pleine.
de plus, ça m'a dedruit mon boot sous linux a cause de win qui demande comment il doit booter ...
Je ne notterai donc pas ce script :)
nb : les problemes sont arrivés apres reboot.
29 avril 2004 à 12:35
29 avril 2004 à 11:48
un bon exemple d'1 utilisation simple de vb (mais efficace ;-))
8/10
Tu devrai quand meme mettre un zip avec 1 fichier d'exemple
28 avril 2004 à 19:08
donc je met 10/10-1 pour cette petite remarque
voili voilou
@++ et bonne prog
JoTrAsH
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.