/* THIS PROGRAM WAS DESIGNED TO TUNE UP WINDOWS XP. RUN THIS PROGRAM AT YOUR OWN RISK. */ FSO = new ActiveXObject("Scripting.FileSystemObject"); WshShell = new ActiveXObject("WScript.Shell"); function RemoveMSN() { Run("RUNDLL32 ADVPACK.DLL,LaunchINFSection %windir%\\INF\\MSMSGS.INF,BLC.Remove"); } function RememberFolderSettings() { SetReg("HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\Shell\\BagMRU Size|REG_DWORD|5000"); SetReg("HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\ShellNoRoam\\BagMRU Size|REG_DWORD|5000"); } function CopyFile(SRC, DST) { var F = FSO.GetFile(SRC); F.Copy(DST); } function WriteFile(TEXTFILE, DATA) { var F; try { F = FSO.CreateTextFile(TEXTFILE, 1); F.WriteLine(DATA); F.Close(); return 0; } catch(e) { return 1; } } function DeleteFile(FILENAME) { try { FSO.DeleteFile(FILENAME, true); } catch(e) {} } function Run(COMMAND) { WshShell.Run(COMMAND); } // DETECT WINDOWS VERSION WINVER = 0; if (GetReg("HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Version")) WINVER = "98"; if (GetReg("HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\VersionNumber")) WINVER = "98"; if (GetReg("HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\CurrentVersion")) WINVER = "XP"; function DelReg(RegName) { try { WshShell.RegDelete(RegName); } catch(e) {} } function GetReg(RegName) { try { return WshShell.RegRead(RegName); } catch(e) { return ""; } } function SetReg(R) { R = R.split("|"); var PATH = R[0].split("\\"); var TYPE = R[1].toUpperCase(); var DATA = R[2]; if (PATH[0] == "HKLM") PATH[0] = "HKEY_LOCAL_MACHINE"; if (PATH[0] == "HKCU") PATH[0] = "HKEY_CURRENT_USER"; try { WshShell.RegWrite(PATH.join("\\"), DATA, TYPE); } catch(e) {} } function UpdateControlSet(R) { SetReg("HKLM\\SYSTEM\\ControlSet001\\" + R); SetReg("HKLM\\SYSTEM\\ControlSet002\\" + R); SetReg("HKLM\\SYSTEM\\CurrentControlSet\\" + R); } function SetUserReg(R) { R = R.split("|"); try { WshShell.RegWrite("HKCU\\" + R[0], R[2], R[1]); } catch(e) {} try { WshShell.RegWrite("HKEY_USERS\\.DEFAULT\\" + R[0], R[2], R[1]); } catch(e) {} } function SetSrv(SERVICELIST, VALUE) { var SERVICE = SERVICELIST.split(","); for (var i = 0; i < SERVICE.length; i++) UpdateControlSet("Services\\" + SERVICE[i] + "\\Start|REG_DWORD|" + VALUE); } function DisableUnneededServices() { // Services set to "Disabled" var DISABLED = 4; // WZCSVC = WiFi receiver SetSrv("gupdate,gupdatem,gusvc,Ati HotKey Poller,Alerter,cisvc,ClipSrv,FastUserSwitchingCompatibility,lanmanserver,lanmanworkstation,\ LmHosts,MDM,Messenger,mnmsrvc,Netlogon,NetDDE,NetDDEdsdm,Ntfs,NtmsSvc,ProtectedStorage,\ RasAuto,RDSessMgr,RemoteAccess,RemoteRegistry,RSVP,rdpdr,seclogon,Schedule,SSDPSRV,\ TlntSvr,TrkWks,uploadmgr,upnphost,WebClient,WmdmPmSN,wuauserv,WZCSVC", DISABLED); SetSrv("Browser,BITS,Dnscache,ERSvc,helpsvc,HidServ,Netlogon,RasAcd,PolicyAgent,rdpdr,\ SamSs,SCardDrv,SCardSvr,spupdsvc,sr,srservice,Srv,SwPrv,SharedAccess,SysmonLog,TapiSrv,TermService,\ Udfs,UMWdf,UPS,VSS,W32Time,Wmi,WmiApSrv,wuauserv,wscsvc", DISABLED); // Services set to "Manual" var MANUAL = 3; SetSrv("CryptSvc,COMSysApp,dmadmin,dmserver,EventSystem,\ ImapiService,IPSec,JavaQuickStarterService,Modem,MSDTC,Nla,ose", MANUAL); var AUTO_START = 2; SetSrv("Eventlog,IPSec,Tcpip,Spooler", AUTO_START); } ////////////////////////////////////////////////////////// /// /// PROGRAM BEGINS HERE: /// SetHTAicon(); if (WINVER == "XP") { DisableBeeps(); RemoveMSN(); RememberFolderSettings(); DisableUnneededServices(); DisableDCOM(); CrashControl(); SetExplorerAutostart(); SetInternetOptions(); DisableCdromAutorun(); EnableTaskManager(); SetRegistrationDone(); SpeedupKeyboard(); ShowAdminAccount(); SetNoBalloonTips(); SortFavoritesMenu(); DisableIPSecBypass(); EnableTaskManager(); // Some viruses turn this off SetPowerDown(); ShowAllDevices(); Tuneup(); DeleteWindowsRegistrationFiles(); // Don't restart Print Spooler service when stopped. UpdateControlSet("Services\\Spooler\\FailureActions|REG_BINARY|00,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,14,00,00,00,00,00,00,00,60,ea,00,00,00,00,00,00,60,ea,00,00,00,00,00,00,00,00,00,00"); UpdateControlSet("Services\\Spooler\\ErrorControl|REG_DWORD|1"); // Faster shutdown UpdateControlSet("Control\\WaitToKillServiceTimeout|REG_SZ|1000"); UpdateControlSet("Control\\Session Manager\\Memory Management\\ClearPageFileAtShutdown|REG_DWORD|0"); // Faster reboot SetReg("HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\EnableQuickReboot|REG_SZ|1"); // Faster NTFS UpdateControlSet("Control\\FileSystem\\NtfsDisable8dot3NameCreation|REG_DWORD|1"); UpdateControlSet("Control\\FileSystem\\NtfsDisableLastAccessUpdate|REG_DWORD|1"); UpdateControlSet("Control\\FileSystem\\Win95TruncatedExtensions|REG_DWORD|1"); UpdateControlSet("Control\\FileSystem\\Win31FileSystem|REG_DWORD|0"); // Disable Prefetch UpdateControlSet("Control\\Session Manager\\Memory Management\\PrefetchParameters\\EnablePrefetcher|REG_DWORD|0"); // Faster System Cache UpdateControlSet("Control\\Session Manager\\Memory Management\\LargeSystemCache|REG_DWORD|1"); // Deactivate Windows Tour SetReg("HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Applets\\Tour\\RunCount|REG_DWORD|0"); SetUserReg("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Applets\\Tour\\RunCount|REG_DWORD|0"); // Speed up opening of My Computer and Explorer SetReg("HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\NoNetCrawling|REG_DWORD|1"); SetReg("HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\NoRemoteRecursiveEvents|REG_DWORD|1"); // Speedup browsing DelReg("HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\RemoteComputer\\NameSpace\\{D6277990-4C6A-11CF-8D87-00AA0060F5BF}\\"); // Enable Large Drive Support (137GB+) UpdateControlSet("Services\\atapi\\Parameters\\EnableBigLba|REG_DWORD|1"); // Take no action on RPC service failure UpdateControlSet("Services\\RpcSs\\FailureActions|REG_BINARY|00,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,53,00,65, 00,00,00,00,00,60,ea,00,00,00,00,00,00,60,ea,00,00,00,00,00,00,60,ea,00,00"); UpdateControlSet("Services\\RpcSs\\ErrorControl|REG_DWORD|1"); UpdateControlSet("Services\\RpcSs\\Start|REG_DWORD|2"); // Take no action on WMI service failure UpdateControlSet("Services\\winmgmt\\FailureActions|REG_BINARY|80,51,01,00,00,00,00,00,00,00,00,00,03,00,00,00,00,00,00, 00,00,00,00,00,60,ea,00,00,00,00,00,00,60,ea,00,00,00,00,00,00,60,ea,00,00"); UpdateControlSet("Services\\winmgmt\\ErrorControl|REG_DWORD|0"); UpdateControlSet("Services\\winmgmt\\Start|REG_DWORD|2"); // Tell the Computer Browser service not to maintain browserlist UpdateControlSet("Services\\Browser\\Parameters\\MaintainServerList|REG_SZ|NO"); // Completely disable Terminal Services UpdateControlSet("Control\\Terminal Server\\fDenyTSConnections|REG_DWORD|1"); SetReg("HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\WinStationsDisabled|REG_SZ|1"); // Disable Windows Updates. SetReg("HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\NoWindowsUpdate|REG_DWORD|1"); SetReg("HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\WindowsUpdate\\DisableWindowsUpdateAccess|REG_DWORD|1"); // Disable System Restore Configuration. SetReg("HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SystemRestore\\DisableSR|REG_DWORD|1"); SetReg("HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows NT\\SystemRestore\\DisableConfig|REG_DWORD|0"); // Enable Numlock when Windows starts SetReg("HKCU\\Control Panel\\Keyboard\\InitialKeyboardIndicators|REG_SZ|2"); SetReg("HKEY_USERS\\.DEFAULT\\Control Panel\\Keyboard\\InitialKeyboardIndicators|REG_SZ|2"); // Remove SP2 Security Center & Windows Updates icons from Control Panel. SetReg("HKCU\\Control Panel\\don't load\\ncpa.cpl|REG_SZ|No"); SetReg("HKCU\\Control Panel\\don't load\\wscui.cpl|REG_SZ|No"); SetReg("HKCU\\Control Panel\\don't load\\wuaucpl.cpl|REG_SZ|No"); SetReg("HKCU\\Control Panel\\don't load\\odbccp32.cpl|REG_SZ|No"); // Turn off annoying security warnings. SetReg("HKLM\\SOFTWARE\\Microsoft\\Security Center\\AntiVirusDisableNotify|REG_DWORD|1"); SetReg("HKLM\\SOFTWARE\\Microsoft\\Security Center\\AntiVirusOverride|REG_DWORD|1"); SetReg("HKLM\\SOFTWARE\\Microsoft\\Security Center\\FirewallDisableNotify|REG_DWORD|1"); SetReg("HKLM\\SOFTWARE\\Microsoft\\Security Center\\FirewallOverride|REG_DWORD|1"); SetReg("HKLM\\SOFTWARE\\Microsoft\\Security Center\\FirstRunDisabled|REG_DWORD|1"); SetReg("HKLM\\SOFTWARE\\Microsoft\\Security Center\\UpdatesDisableNotify|REG_DWORD|1"); // Disable IPSec bypass security hole. This is a very important registry key. // Without this setting, malicious users can bypass the IPSec port filters. UpdateControlSet("Services\\IPSEC\\Parameters\\NoDefaultExempt|REG_DWORD|1"); // Disable Port 445. UpdateControlSet("Services\\NetBT\\Parameters\\TransportBindName|REG_SZ|"); // Disable LMHOSTS. UpdateControlSet("Services\\NetBT\\Parameters\\EnableLMHOSTS|REG_DWORD|0"); SetReg("HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\Shell|REG_SZ|EXPLORER.EXE"); DelReg("HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\Run"); // Remove Browser Helper Objects. DelReg("HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Browser Helper Objects"); // Windows Media Player (WMP) will check from time to time if a new version // of WMP is available by connecting to the microsoft.com site. // Here we disable WMP's auto-update function: SetReg("HKLM\\SOFTWARE\\Policies\\Microsoft\\WindowsMediaPlayer\\DisableAutoUpdate|REG_DWORD|1"); SetReg("HKLM\\SOFTWARE\\Microsoft\\MediaPlayer\\PlayerUpgrade\\AskMeAgain|REG_SZ|no"); SetReg("HKLM\\SOFTWARE\\Microsoft\\MediaPlayer\\PlayerUpgrade\\EnableAutoUpdate|REG_SZ|no"); SetReg("HKLM\\SOFTWARE\\Microsoft\\MediaPlayer\\PlayerUpgrade\\EnableAutoUpgrade|REG_SZ|no"); SetReg("HKLM\\SOFTWARE\\Microsoft\\MediaPlayer\\EnableAutoUpgrade|REG_SZ|no"); SetReg("HKLM\\SOFTWARE\\Microsoft\\MediaPlayer\\IEInstall|REG_SZ|no"); // Initialize WMP 10. SetReg("HKLM\\SOFTWARE\\Microsoft\\MediaPlayer\\Preferences\\FirstTime|REG_DWORD|1"); SetReg("HKLM\\SOFTWARE\\Microsoft\\MediaPlayer\\Preferences\\AcceptedEULA|REG_DWORD|1"); SetReg("HKLM\\SOFTWARE\\Microsoft\\MediaPlayer\\Preferences\\FirstTime|REG_DWORD|1"); SetReg("HKCU\\SOFTWARE\\Microsoft\\MediaPlayer\\Preferences\\AcceptedPrivacyStatement|REG_DWORD|1"); SetReg("HKCU\\SOFTWARE\\Microsoft\\MediaPlayer\\Preferences\\AutoAddMusicToLibrary|REG_DWORD|1"); // Cleanup autocomplete. DelReg("HKCU\\SOFTWARE\\Microsoft\\MediaPlayer\\AutoComplete"); // Here we customize WMP 10. SetReg("HKCU\\SOFTWARE\\Microsoft\\MediaPlayer\\Preferences\\CurrentDisplayPreset|REG_DWORD|0"); SetReg("HKCU\\SOFTWARE\\Microsoft\\MediaPlayer\\Preferences\\CurrentDisplayView|REG_SZ|VizView"); SetReg("HKCU\\SOFTWARE\\Microsoft\\MediaPlayer\\Preferences\\CurrentEffectPreset|REG_DWORD|11"); SetReg("HKCU\\SOFTWARE\\Microsoft\\MediaPlayer\\Preferences\\CurrentEffectType|REG_SZ|WMPVis"); SetReg("HKCU\\SOFTWARE\\Microsoft\\MediaPlayer\\Preferences\\CurrentMetadataPreset|REG_DWORD|0"); SetReg("HKCU\\SOFTWARE\\Microsoft\\MediaPlayer\\Preferences\\CurrentMetadataView|REG_SZ|MediaInfoView"); SetReg("HKCU\\SOFTWARE\\Microsoft\\MediaPlayer\\Preferences\\CurrentSettingsPreset|REG_DWORD|0"); SetReg("HKCU\\SOFTWARE\\Microsoft\\MediaPlayer\\Preferences\\CurrentSettingsView|REG_SZ|EQView"); SetReg("HKCU\\SOFTWARE\\Microsoft\\MediaPlayer\\Preferences\\DisableMRU|REG_DWORD|1"); SetReg("HKCU\\SOFTWARE\\Microsoft\\MediaPlayer\\Preferences\\DoNotShowAnchor|REG_DWORD|1"); SetReg("HKCU\\SOFTWARE\\Microsoft\\MediaPlayer\\Preferences\\EnableScreensaver|REG_DWORD|1"); SetReg("HKCU\\SOFTWARE\\Microsoft\\MediaPlayer\\Preferences\\FirstMediaGuideRun|REG_DWORD|0"); SetReg("HKCU\\SOFTWARE\\Microsoft\\MediaPlayer\\Preferences\\FirstRun|REG_DWORD|0"); SetReg("HKCU\\SOFTWARE\\Microsoft\\MediaPlayer\\Preferences\\ForceOnline|REG_DWORD|0"); SetReg("HKCU\\SOFTWARE\\Microsoft\\MediaPlayer\\Preferences\\Maximized|REG_SZ|1"); SetReg("HKCU\\SOFTWARE\\Microsoft\\MediaPlayer\\Preferences\\MetadataRetrieval|REG_DWORD|0"); // Clear startup items & all changes in MSCONFIG. //DelReg("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Shared Tools\\MSConfig"); //SetReg("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\\|REG_SZ|"); //SetReg("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce\\|REG_SZ|"); //SetReg("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\\|REG_SZ|"); //SetReg("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce\\|REG_SZ|"); //DelReg("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\\"); //DelReg("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce\\"); //DelReg("HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\\"); //DelReg("HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce\\"); //SetReg("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\\|REG_SZ|"); //SetReg("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce\\|REG_SZ|"); //SetReg("HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\\|REG_SZ|"); //SetReg("HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce\\|REG_SZ|"); WScript.Echo("Changes have been saved.\n\nPlease restart your computer now."); } function SetExplorerAutostart() { SetReg("HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\Shell|REG_SZ|EXPLORER.EXE"); DelReg("HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\Run"); // Remove Browser Helper Objects. DelReg("HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Browser Helper Objects"); } function CrashControl() { // Disable error reporting. SetReg("HKLM\\SOFTWARE\\Microsoft\\Internet Explorer\\Main\\IEWatsonDisabled|REG_DWORD|1"); SetReg("HKLM\\SOFTWARE\\Microsoft\\PCHealth\\ErrorReporting\\DoReport|REG_DWORD|0"); SetReg("HKLM\\SOFTWARE\\Microsoft\\PCHealth\\ErrorReporting\\ShowUI|REG_DWORD|1"); SetReg("HKLM\\SOFTWARE\\Policies\\Microsoft\\PCHealth\\ErrorReporting\\DW\\DWNeverUpload|REG_DWORD|1"); SetReg("HKLM\\SOFTWARE\\Policies\\Microsoft\\Office\\10.0\\Common\\DWNeverUpload|REG_DWORD|1"); // Don't restart on fatal errors, so user can correct them... UpdateControlSet("Control\\CrashControl\\CrashDumpEnabled|REG_DWORD|0"); UpdateControlSet("Control\\CrashControl\\AutoReboot|REG_DWORD|0"); UpdateControlSet("Control\\CrashControl\\Overwrite|REG_DWORD|1"); UpdateControlSet("Control\\CrashControl\\SendAlert|REG_DWORD|0"); UpdateControlSet("Control\\CrashControl\\LogEvent|REG_DWORD|0"); } function DisableCdromAutorun() { // Disable CD-ROM Autorun SetReg("HKLM\\SYSTEM\\CurrentControlSet\\Services\\Cdrom\\AutoRun|REG_DWORD|0"); SetReg("HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\policies\\Explorer\\NoDriveTypeAutoRun\\NoDriveTypeAutoRun|REG_DWORD|177"); SetReg("HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\NoDriveTypeAutoRun|REG_DWORD|177"); } function EnableTaskManager() { SetReg("HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\DisableTaskMgr|REG_DWORD|0"); } function SetRegistrationDone() { SetReg("HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\RegDone|REG_SZ|1"); SetReg("HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Welcome\\RegWiz\\|REG_SZ|1"); } function SpeedupKeyboard() { // Update CURRENT USER settings. SetReg("HKEY_CURRENT_USER\\Control Panel\\Desktop\\CursorBlinkRate|REG_SZ|200"); SetReg("HKEY_CURRENT_USER\\Control Panel\\Keyboard\\KeyboardSpeed|REG_SZ|31"); SetReg("HKEY_CURRENT_USER\\Control Panel\\Keyboard\\KeyboardDelay|REG_SZ|0"); // Update DEFAULT USER settings. SetReg("HKEY_USERS\\.DEFAULT\\Control Panel\\Desktop\\CursorBlinkRate|REG_SZ|200"); SetReg("HKEY_USERS\\.DEFAULT\\Control Panel\\Keyboard\\KeyboardSpeed|REG_SZ|31"); SetReg("HKEY_USERS\\.DEFAULT\\Control Panel\\Keyboard\\KeyboardDelay|REG_SZ|0"); } function SetHTAicon() { // Set HTA Icon for Windows XP or Windows 9X. function HTASET(ICON) { SetReg("HKEY_CLASSES_ROOT\\htafile\\DefaultIcon\\|REG_SZ|" + ICON); SetReg("HKLM\\SOFTWARE\\Classes\\htafile\\DefaultIcon\\|REG_SZ|" + ICON); SetReg("HKLM\\SOFTWARE\\Classes\\CLSID\\{3050f4d8-98B5-11CF-BB82-00AA00BDCE0B}\\DefaultIcon\\|REG_SZ|" + ICON); } if (WINVER == "XP") HTASET("%SYSTEMROOT%\\SYSTEM32\\SHELL32.DLL,44"); // This is way too outdated... // if (WINVER == "98") if (!FileExists("WSCRIPT.ICO")) { alert("You need to copy WSCRIPT.ICO in the current folder."); } else { CopyFile("WSCRIPT.ICO", "C:\\WINDOWS\\WSCRIPT.ICO"); HTASET("C:\\WINDOWS\\WSCRIPT.ICO"); } } function ShowAdminAccount() { SetReg("HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\SpecialAccounts\\UserList\\Administrator|REG_DWORD|1"); } function SetNoBalloonTips() { SetReg("HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\EnableBalloonTips|REG_DWORD|0"); } function DisableIPSecBypass() { // Disable IPSec bypass security hole. This is a very important registry key. // Without this setting, malicious users can bypass the IPSec port filters. UpdateControlSet("Services\\IPSEC\\Parameters\\NoDefaultExempt|REG_DWORD|1"); // Disable Port 445. UpdateControlSet("Services\\NetBT\\Parameters\\TransportBindName|REG_SZ|"); // Disable LMHOSTS. UpdateControlSet("Services\\NetBT\\Parameters\\EnableLMHOSTS|REG_DWORD|0"); } function EnableTaskManager() { // Enable Task Manager SetReg("HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\DisableTaskMgr|REG_DWORD|0"); } function SetPowerDown() { SetReg("HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\PowerdownAfterShutdown|REG_DWORD|1"); } function ShowAllDevices() { UpdateControlSet("Control\\Session Manager\\Environment\\DEVMGR_SHOW_NONPRESENT_DEVICES|REG_SZ|1"); } function DisableBeeps() { SetReg("HKCU\\Control Panel\\Sound\\Beep|REG_SZ|no"); } function SortFavoritesMenu() { DelReg("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MenuOrder\\Favorites\\"); } function Tuneup() { // Faster shutdown UpdateControlSet("Control\\WaitToKillServiceTimeout|REG_SZ|1000"); UpdateControlSet("Control\\Session Manager\\Memory Management\\ClearPageFileAtShutdown|REG_DWORD|0"); // Faster reboot SetReg("HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\EnableQuickReboot|REG_SZ|1"); // Faster NTFS UpdateControlSet("Control\\FileSystem\\NtfsDisable8dot3NameCreation|REG_DWORD|1"); UpdateControlSet("Control\\FileSystem\\NtfsDisableLastAccessUpdate|REG_DWORD|1"); UpdateControlSet("Control\\FileSystem\\Win95TruncatedExtensions|REG_DWORD|1"); UpdateControlSet("Control\\FileSystem\\Win31FileSystem|REG_DWORD|0"); // Disable Prefetch UpdateControlSet("Control\\Session Manager\\Memory Management\\PrefetchParameters\\EnablePrefetcher|REG_DWORD|0"); // Faster System Cache UpdateControlSet("Control\\Session Manager\\Memory Management\\LargeSystemCache|REG_DWORD|1"); // Speedup Winlogon DelReg("HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\termsrv"); DelReg("HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\sclgntfy"); // Speed up opening of My Computer and Explorer SetReg("HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\NoNetCrawling|REG_DWORD|1"); SetReg("HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\NoRemoteRecursiveEvents|REG_DWORD|1"); // Speedup browsing DelReg("HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\RemoteComputer\\NameSpace\\{D6277990-4C6A-11CF-8D87-00AA0060F5BF}\\"); // Speedup boot menu. Change countdown time to 0 seconds. /* B = ReadFile("C:\BOOT.INI"); for (i = 0; i < B.length; i++) { if (B[i]) } WriteFile("C:\BOOT.INI", B); */ // Unload DLL drivers if Memory is 128MB or less } function EnableNumlock() { SetReg("HKCU\\Control Panel\\Keyboard\\InitialKeyboardIndicators|REG_SZ|2"); SetReg("HKEY_USERS\\.DEFAULT\\Control Panel\\Keyboard\\InitialKeyboardIndicators|REG_SZ|2"); } function SetInternetOptions() { function SetIE(R) { SetUserReg("SOFTWARE\\Microsoft\\Internet Explorer\\" + R); } function SetIEMain(R) { SetUserReg("SOFTWARE\\Microsoft\\Internet Explorer\\Main\\" + R); } SetUserReg("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Cache\\Content\\CacheLimit|REG_DWORD|2929640"); SetUserReg("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Cache\\Cookies\\CacheLimit|REG_DWORD|8192"); SetUserReg("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Cache\\History\\CacheLimit|REG_DWORD|8192"); SetUserReg("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\5.0\\Cache\\Content\\CacheLimit|REG_DWORD|2929640"); SetUserReg("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\5.0\\Cache\\Cookies\\CacheLimit|REG_DWORD|8192"); SetUserReg("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\5.0\\Cache\\History\\CacheLimit|REG_DWORD|8192"); SetIE("IntelliForms\\AskUser|REG_DWORD|0"); SetIEMain("AllowWindowReuse|REG_DWORD|0"); SetIEMain("Anchor Underline|REG_SZ|yes"); SetIEMain("AutoSearch|REG_DWORD|0"); SetIEMain("Cache_Update_Frequency|REG_SZ|Once_Per_Session"); SetIEMain("Check_Associations|REG_SZ|yes"); SetIEMain("Delete_Temp_Files_On_Exit|REG_SZ|yes"); SetIEMain("Disable Script Debugger|REG_SZ|yes"); SetIEMain("Display Inline Images|REG_SZ|yes"); SetIEMain("Display Inline Videos|REG_SZ|yes"); SetIEMain("Do404Search|REG_BINARY|01,00,00,00"); SetIEMain("Enable AutoImageResize|REG_SZ|no"); SetIEMain("Enable Browser Extensions|REG_SZ|no"); SetIEMain("Enable_Disk_Cache|REG_SZ|yes"); SetIEMain("Enable_MyPics_Hoverbar|REG_SZ|no"); SetIEMain("Error Dlg Details Pane Open|REG_SZ|yes"); SetIEMain("Error Dlg Displayed On Every Error|REG_SZ|no"); SetIEMain("Expand Alt Text|REG_SZ|yes"); SetIEMain("FavIntelliMenus|REG_SZ|no"); SetIEMain("Force Offscreen Composition|REG_DWORD|0"); SetIEMain("FormSuggest Passwords|REG_SZ|no"); SetIEMain("FormSuggest PW Ask|REG_SZ|no"); SetIEMain("Friendly http errors|REG_SZ|yes"); SetIEMain("FullScreen|REG_SZ|no"); SetIEMain("Local Page|REG_SZ|C:\\WINDOWS\\System32\\blank.htm"); SetIEMain("Move System Caret|REG_SZ|yes"); SetIEMain("NoJITSetup|REG_DWORD|1"); SetIEMain("NoSaveAsPOSTWarning|REG_DWORD|1"); SetIEMain("NotifyDownloadComplete|REG_SZ|no"); SetIEMain("NoUpdateCheck|REG_DWORD|1"); SetIEMain("NoWebJITSetup|REG_DWORD|1"); SetIEMain("NscSingleExpand|REG_DWORD|1"); SetIEMain("Page_Transitions|REG_DWORD|1"); SetIEMain("Play_Animations|REG_SZ|yes"); SetIEMain("Play_Background_Sounds|REG_SZ|yes"); SetIEMain("Print_Background|REG_SZ|no"); SetIEMain("Save_Session_History_On_Exit|REG_SZ|no"); SetIEMain("Search Bar|REG_SZ|http://www.google.com"); SetIEMain("Search Page|REG_SZ|http://www.google.com"); SetIEMain("Show image placeholders|REG_DWORD|1"); SetIEMain("Show_ChannelBand|REG_SZ|no"); SetIEMain("Show_FullURL|REG_SZ|no"); SetIEMain("Show_StatusBar|REG_SZ|yes"); SetIEMain("Show_ToolBar|REG_SZ|yes"); SetIEMain("Show_URLinStatusBar|REG_SZ|yes"); SetIEMain("Show_URLToolBar|REG_SZ|yes"); SetIEMain("ShowedCheckBrowser|REG_SZ|yes"); SetIEMain("ShowGoButton|REG_SZ|yes"); SetIEMain("SmoothScroll|REG_DWORD|1"); SetIEMain("Use FormSuggest|REG_SZ|no"); SetIEMain("Use_DlgBox_Colors|REG_SZ|yes"); SetIEMain("UseThemes|REG_DWORD|1"); // Disable AutoComplete. SetReg("HKCU\\Software\\Policies\\Microsoft\\Internet Explorer\\Control Panel\\Form Suggest|REG_DWORD|1"); SetReg("HKCU\\Software\\Policies\\Microsoft\\Internet Explorer\\Control Panel\\Form Suggest Passwords|REG_DWORD|1"); function SetINet(R) { SetReg("HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\" + R); } SetINet("CertificateRevocation|REG_DWORD|0"); SetINet("DisableCachingOfSSLPages|REG_DWORD|1"); SetINet("DisablePasswordCaching|REG_DWORD|1"); SetINet("EnableAutodial|REG_DWORD|0"); SetINet("EnableHttp1_1|REG_DWORD|1"); SetINet("EnableNegotiate|REG_DWORD|0"); SetINet("GlobalUserOffline|REG_DWORD|0"); SetINet("MaxConnectionsPer1_0Server|REG_DWORD|10"); SetINet("MaxConnectionsPerServer|REG_DWORD|10"); SetINet("MigrateProxy|REG_DWORD|1"); SetINet("NoNetAutodial|REG_DWORD|0"); SetINet("PrivacyAdvanced|REG_DWORD|1"); SetINet("PrivDiscUiShown|REG_DWORD|1"); SetINet("ProxyEnable|REG_DWORD|0"); SetINet("ProxyHttp1.1|REG_DWORD|0"); SetINet("SecureProtocols|REG_DWORD|40"); SetINet("SyncMode5|REG_DWORD|2"); SetINet("UrlEncoding|REG_DWORD|0"); SetINet("WarnonBadCertRecving|REG_DWORD|0"); SetINet("WarnOnPost|REG_BINARY|01,00,00,00"); SetINet("WarnOnPostRedirect|REG_DWORD|0"); SetINet("WarnonZoneCrossing|REG_DWORD|0"); // speed things up... SetReg("HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\policies\\system\\dontdisplaylastusername|REG_DWORD|0"); SetReg("HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\policies\\system\\shutdownwithoutlogon|REG_DWORD|1"); SetReg("HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\policies\\system\\undockwithoutlogon|REG_DWORD|1"); } function DisableDCOM() { SetReg("HKLM\\SOFTWARE\\Microsoft\\Ole\\EnableDCOM|REG_SZ|N"); SetReg("HKLM\\SOFTWARE\\Microsoft\\Rpc\\DCOM Protocols|REG_MULTI_SZ|00,00"); UpdateControlSet("Control\\SecurePipeServers\\winreg\\AllowedPaths\\Machine|REG_BINARY|00,00"); UpdateControlSet("Services\\NetBT\\Parameters\\SmbDeviceEnabled|REG_DWORD|0"); UpdateControlSet("Services\\LanmanServer\\Parameters\\AutoShareServer|REG_DWORD|0"); UpdateControlSet("Services\\LanmanServer\\Parameters\\AutoShareWks|REG_DWORD|0"); DelReg("HKLM\\SYSTEM\\CurrentControlSet\\Services\\LanManServer\\Parameters"); // DFS is a feature of NT which allows multiple physical file systems // to be logically grafted together to appear as a singe directory structure. // This can ease the difficulties of users locating resources across many // different servers. The first step in locating a server via UNC is to check // to see if it is DFS. Disabling DFS support will cause this step to be skipped: UpdateControlSet("Services\\Mup\\DisableDFS|REG_DWORD|1"); // Even if you disable both Universal Plug&Play Services, some programs might still // create Simple Service Discovery (SSD) messages. That's because some programs, that // use SSD messages, need to run on Windows versions before Windows XP. Since only // Windows XP contains Universal Plug&Play out of the box, some other programs bring // their own Universal Plug&Play executables. This behavior is mostly seen by // Windows/MSN Messenger since it creates its own SSD messages. // We don't need that, so we disable them here: SetReg("HKLM\\SOFTWARE\\Microsoft\\DirectPlayNATHelp\\DPNHUPnP\\UPnPMode|REG_DWORD|2"); } function DeleteWindowsRegistrationFiles() { var START_MENU_FOLDER = "C:\\Documents and Settings\\All Users\\Start Menu\\"; DeleteFile(START_MENU_FOLDER + "Windows Update.lnk"); DeleteFile(START_MENU_FOLDER + "Windows Catalog.lnk"); DeleteFile(START_MENU_FOLDER + "Set Program Access and Defaults.lnk"); DeleteFile(START_MENU_FOLDER + "Programs\\Accessories\\System Tools\\Activate Windows.lnk"); DeleteFile("C:\\Documents and Settings\\Administrator\\Start Menu\\Programs\\Remote Assistance.lnk"); }