WinXP 简易优化 核心部分 源代码 公布

  WinXP 简易优化发布至今,有些反应,有的说好,也有的不喜欢,不管怎么样,大家各取所需就行。

  前段时间整理了一下源代码,也没什么技术含量,所以只把一些最核心的东西贴出来,也就是利用NSIS的自定义页面功能的代码。嘿嘿,不到之处,大家多指教,多交流,这也不是什么特别神秘的东西,需要的可以自己利用,有能力的完全可以自己在写一套程序代码!
  目前WinXP 简易优化 1.5版是目前的最新版,也是最终版,当然了,如果有了新的创意和想法,我也会在对其更新的。

  对于一些网友反映的与工行U盾冲突的问题,优化后,重新安装工行U盾即可。

  以下就是核心部分代码,其他的代码没有太多实际意义,也就不贴了!需要的朋友可以留言联系。呵呵!

Have Enjoy!

ReserveFile "${NSISDIR}PluginsInstallOptions.dll"
ReserveFile "XPOP15.ini"
ReserveFile "hxlogo.bmp"
Function XPOP15
 !insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
  InitPluginsDir
  File /oname=$PLUGINSDIRXPOP15.ini "XPOP15.ini"
  File /oname=$PLUGINSDIRhxlogo.bmp "hxlogo.bmp"
  WriteINIStr $PLUGINSDIRXPOP15.ini "Field 32" "Text" "$PLUGINSDIRhxlogo.bmp"

  WriteINIStr $PLUGINSDIRXPOP15.ini "Field 3" "State" 1
  WriteINIStr $PLUGINSDIRXPOP15.ini "Field 5" "State" 1
  WriteINIStr $PLUGINSDIRXPOP15.ini "Field 7" "State" 1
  WriteINIStr $PLUGINSDIRXPOP15.ini "Field 9" "State" 1
  WriteINIStr $PLUGINSDIRXPOP15.ini "Field 10" "State" 1
  WriteINIStr $PLUGINSDIRXPOP15.ini "Field 12" "State" 1
  WriteINIStr $PLUGINSDIRXPOP15.ini "Field 14" "State" 1
  WriteINIStr $PLUGINSDIRXPOP15.ini "Field 15" "State" 1
  WriteINIStr $PLUGINSDIRXPOP15.ini "Field 17" "State" 1
  WriteINIStr $PLUGINSDIRXPOP15.ini "Field 20" "State" 1
  WriteINIStr $PLUGINSDIRXPOP15.ini "Field 21" "State" 1

  InstallOptions::initDialog /NOUNLOAD "$PLUGINSDIRXPOP15.ini"
  Pop $0
  InstallOptions::show
  Pop $0

  ReadINIStr $OP103 "$PLUGINSDIRXPOP15.ini" "Field 3" "State"
  StrCmp $OP103 "1" 0 +5
   WriteRegDWORD HKLM "SYSTEMCurrentControlSetServicesVxdBIOS" "CPUPriority" "0x00000001"
   WriteRegDWORD HKLM "SYSTEMCurrentControlSetServicesVxdBIOS" "PCIConcur" "0x00000001"
   WriteRegDWORD HKLM "SYSTEMCurrentControlSetServicesVxdBIOS" "FastDRAM" "0x00000001"
   WriteRegDWORD HKLM "SYSTEMCurrentControlSetServicesVxdBIOS" "AGPConcur" "0x00000001"
   Goto +1

  ReadINIStr $OP104 "$PLUGINSDIRXPOP15.ini" "Field 4" "State"
  StrCmp $OP104 "1" 0 +2
   WriteRegStr HKLM "SystemCurrentControlSetControlFileSystem" "ConfigFileAllocSize" "0x000001f4"
   Goto +1

  ReadINIStr $OP105 "$PLUGINSDIRXPOP15.ini" "Field 5" "State"
  StrCmp $OP105 "1" 0 +2
   WriteRegDWORD HKLM "SOFTWAREMicrosoftWindowsCurrentVersionExplorer" "AlwaysUnloadDLL" "0x00000001"
   Goto +1

  ReadINIStr $OP106 "$PLUGINSDIRXPOP15.ini" "Field 6" "State"
  StrCmp $OP106 "1" 0 +2
   WriteRegDWORD HKLM "SOFTWAREMicrosoftWindows NTCurrentVersionSystemRestore" "DisableSR" "0x00000001"
   Goto +1

  ReadINIStr $OP107 "$PLUGINSDIRXPOP15.ini" "Field 7" "State"
  StrCmp $OP107 "1" 0 +3
   WriteRegDWORD HKLM "SystemCurrentControlSetServicesLanmanServerParameters" "AutoShareServer" "0x000000"
   WriteRegDWORD HKLM "SystemCurrentControlSetServicesLanmanServerParameters" "AutoShareWks" "0x00000000"
   Goto +1

  ReadINIStr $OP108 "$PLUGINSDIRXPOP15.ini" "Field 8" "State"
  StrCmp $OP108 "1" 0 +2
   WriteRegDWORD HKLM "SOFTWAREMicrosoftWindows NTCurrentVersionWinlogon" "SFCDisable" "0xffffff9d"
   Goto +1

  ReadINIStr $OP109 "$PLUGINSDIRXPOP15.ini" "Field 9" "State"
  StrCmp $OP109 "1" 0 +2
   WriteRegStr HKCU "Control PanelDesktop" "HungAppTimeout" "1000"
   Goto +1

  ReadINIStr $OP110 "$PLUGINSDIRXPOP15.ini" "Field 10" "State"
  StrCmp $OP110 "1" 0 +2
   DeleteRegValue HKCR "lnkfile" "isshortcut"
   Goto +1

  ReadINIStr $OP111 "$PLUGINSDIRXPOP15.ini" "Field 11" "State"
  StrCmp $OP111 "1" 0 +3
   WriteRegBIN HKU ".DEFAULTSoftwareMicrosoftWindowsCurrentVersionExplorer" "Link" "00000000"
   WriteRegBIN HKCU "SoftwareMicrosoftWindowsCurrentVersionExplorer" "Link" "00000000"
   Goto +1

  ReadINIStr $OP112 "$PLUGINSDIRXPOP15.ini" "Field 12" "State"
  StrCmp $OP112 "1" 0 +2
   WriteRegDWORD HKLM "SOFTWAREMicrosoftWindows NTCurrentVersionAeDebug" "Auto" "0"
   Goto +1

  ReadINIStr $OP113 "$PLUGINSDIRXPOP15.ini" "Field 13" "State"
  StrCmp $OP113 "1" 0 +2
   WriteRegDWORD HKLM "SYSTEMCurrentControlSetControlSession ManagerMemory ManagementPrefetchParameters" "EnablePrefetcher" 0x00000003
   Goto +1

  ReadINIStr $OP114 "$PLUGINSDIRXPOP15.ini" "Field 14" "State"
  StrCmp $OP114 "1" 0 +2
   WriteRegDWORD HKLM "SYSTEMCurrentControlSetControlFileSystem" "ConfigFileAllocSize" "0x000001f4"
   Goto +1

  ReadINIStr $OP115 "$PLUGINSDIRXPOP15.ini" "Field 15" "State"
  StrCmp $OP115 "1" 0 +2
   WriteRegStr HKCU "Control PanelDesktop" "MenuShowDelay" "0"
   Goto +1

  ReadINIStr $OP116 "$PLUGINSDIRXPOP15.ini" "Field 16" "State"
  StrCmp $OP116 "1" 0 +2
   Exec "Regsvr32 /u /s Zipfldr.dll"
   Goto +1

  ReadINIStr $OP117 "$PLUGINSDIRXPOP15.ini" "Field 17" "State"
  StrCmp $OP117 "1" 0 +2
   WriteRegDWORD HKLM "SYSTEMCurrentControlSetControlUpdate" "UpdateMode" "0x00000000"
   Goto +1

  ReadINIStr $OP118 "$PLUGINSDIRXPOP15.ini" "Field 18" "State"
  StrCmp $OP118 "1" 0 +3
   WriteRegDWORD HKLM "SYSTEMCurrentControlSetControlSession ManagerMemory Management" "DisablePagingExecutive" "0x00000001"
   WriteRegDWORD HKLM "SYSTEMCurrentControlSetControlSession ManagerMemory Management" "SecondLevelDataCache" "0x00000200"
   Goto +1

  ReadINIStr $OP119 "$PLUGINSDIRXPOP15.ini" "Field 19" "State"
  StrCmp $OP119 "1" 0 +2
   WriteRegDWORD HKLM "Control PanelDesktop" "AutoEndTasks" "0x00000001"
   Goto +1

  ReadINIStr $OP120 "$PLUGINSDIRXPOP15.ini" "Field 20" "State"
  StrCmp $OP120 "1" 0 +2
   WriteRegDWORD HKLM "SYSTEMCurrentControlSetControlSecurePipeServerswinreg" "RemoteRegAccess" "0x00000001"
   Goto +1

  ReadINIStr $OP121 "$PLUGINSDIRXPOP15.ini" "Field 21" "State"
  StrCmp $OP121 "1" 0 +2
   WriteRegDWORD HKLM "SOFTWAREPoliciesMicrosoftInternet ExplorerInfodeliveryRestrictions" "NoJITSetup" "0x00000001"
   Goto +1

  ReadINIStr $OP122 "$PLUGINSDIRXPOP15.ini" "Field 22" "State"
  StrCmp $OP122 "1" 0 +2
   WriteRegDWORD HKCU "SoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" "EnableBalloonTips" "0x00000000"
   Goto +1

  ReadINIStr $OP123 "$PLUGINSDIRXPOP15.ini" "Field 23" "State"
  StrCmp $OP123 "1" 0 +2
   WriteRegStr HKCU "Control PanelSound" "Beep" "NO"
   Goto +1

  ReadINIStr $OP124 "$PLUGINSDIRXPOP15.ini" "Field 24" "State"
  StrCmp $OP124 "1" 0 +2
   WriteRegStr HKLM "SOFTWAREMicrosoftWindowsCurrentVersionExplorerRemoteComputerNameSpace" "" ""
   WriteRegStr HKLM "SOFTWAREMicrosoftWindowsCurrentVersionExplorerRemoteComputerNameSpace{2227A280-3AEA-1069-A2DE-08002B30309D}" "@" "Printers"
   Goto +1

  ReadINIStr $OP125 "$PLUGINSDIRXPOP15.ini" "Field 25" "State"
  StrCmp $OP125 "1" 0 +5
   File /oname=$PLUGINSDIRsop1.bat "sop1.bat"
   Execwait "$PLUGINSDIRsop1.bat"
   Delete "$PLUGINSDIRsop1.bat"
  Goto done

  ReadINIStr $OP126 "$PLUGINSDIRXPOP15.ini" "Field 26" "State"
  StrCmp $OP126 "1" 0 +5
   File /oname=$PLUGINSDIRsop2.bat "sop2.bat"
   Execwait "$PLUGINSDIRsop2.bat"
   Delete "$PLUGINSDIRsop2.bat"
  Goto done

  ReadINIStr $OP127 "$PLUGINSDIRXPOP15.ini" "Field 27" "State"
  StrCmp $OP127 "1" 0 +5
   File /oname=$PLUGINSDIRsop3.bat "sop3.bat"
   Execwait "$PLUGINSDIRsop3.bat"
   Delete "$PLUGINSDIRsop3.bat"
  Goto done

  ReadINIStr $OP128 "$PLUGINSDIRXPOP15.ini" "Field 28" "State"
  StrCmp $OP128 "1" 0 +5
   File /oname=$PLUGINSDIRsop4.bat "sop4.bat"
   Execwait "$PLUGINSDIRsop4.bat"
   Delete "$PLUGINSDIRsop4.bat"
  Goto done

  ReadINIStr $OP129 "$PLUGINSDIRXPOP15.ini" "Field 29" "State"
  StrCmp $OP129 "1" 0 +5
   File /oname=$PLUGINSDIRsop5.bat "sop5.bat"
   Execwait "$PLUGINSDIRsop5.bat"
   Delete "$PLUGINSDIRsop5.bat"
  Goto done

 done:
  Goto +1

  ReadINIStr $OP131 "$PLUGINSDIRXPOP15.ini" "Field 31" "State"
  StrCmp $OP131 "1" 0 +4
   File /oname=$PLUGINSDIREvID4226Patch.exe "EvID4226Patch.exe"
   Execwait "$PLUGINSDIREvID4226Patch.exe"
   Delete "$PLUGINSDIREvID4226Patch.exe"
   Goto +1
FunctionEnd