Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

122 lines
2.0 KiB

  1. @echo Installing AppFix...
  2. set PATH=%PATH%;%windir%\system32
  3. REM Temporarily change to the AppPatch directory
  4. pushd %1%
  5. REM Quietly delete all DLLs
  6. del /q *.DLL >nul
  7. @echo Delete systest.sdb...
  8. IF EXIST systest.sdb (
  9. del /f systest.sdb >nul
  10. )
  11. @echo Check OS version...
  12. ver | findstr /c:"Version 5.00." > nul
  13. IF errorlevel 1 goto TryWhistler
  14. IF errorlevel 0 goto Win2k
  15. goto AllDone
  16. :Win2k
  17. @echo Windows2000 detected
  18. REM Kill explorer
  19. kill -f explorer.exe
  20. sleep 2
  21. IF EXIST SlayerUI.dll (
  22. regsvr32 /u /s SlayerUI.dll
  23. )
  24. @echo Quietly delete all DLLs...
  25. del /q *.DLL >nul
  26. @echo Register SlayerUI shell extensions...
  27. fcopy SlayerUI.dl_ SlayerUI.dll
  28. del SlayerUI.dl_
  29. regsvr32 /s SlayerUI.dll
  30. @echo Install the certificate needed to replace shim.dll...
  31. certmgr.exe -add testroot.cer -r localMachine -s root
  32. @echo Replace AppHelp messages...
  33. copy apps.chm %windir%\help\apps.chm
  34. del apps.chm
  35. @echo Replace the shim engine...
  36. fcopy shim.dl_ %windir%\system32\shim.dll
  37. del shim.dl_
  38. IF errorlevel 1 pause
  39. IF EXIST apphelp.sdb del /f apphelp.sdb >nul
  40. @echo Add the registry stub keys...
  41. IF EXIST w2kmain.reg (
  42. regedit /s w2kmain.reg >nul
  43. )
  44. @echo Replace the shim databases
  45. fcopy sysmain.sd_ sysmain.sdb
  46. @echo Replace the shim DLLs
  47. fcopy AcLayers.dl_ AcLayers.dll
  48. fcopy AcSpecfc.dl_ AcSpecfc.dll
  49. fcopy AcGenral.dl_ AcGenral.dll
  50. fcopy AcXtrnal.dl_ AcXtrnal.dll
  51. start explorer
  52. goto Cleanup
  53. :TryWhistler
  54. ver | findstr /c:"Version 5.1." > nul
  55. IF errorlevel 1 goto Cleanup
  56. IF errorlevel 0 goto Whistler
  57. goto AllDone
  58. :Whistler
  59. @echo Whistler detected. This package is for Win2k only !!!
  60. goto Cleanup
  61. :Cleanup
  62. @echo Cleanup...
  63. del /f certmgr.exe >nul
  64. del /f kill.exe >nul
  65. del /f sleep.exe >nul
  66. del /f testroot.cer >nul
  67. del /f fcopy.exe >nul
  68. del /f AcLayers.dl_ >nul
  69. del /f AcSpecfc.dl_ >nul
  70. del /f AcGenral.dl_ >nul
  71. del /f AcXtrnal.dl_ >nul
  72. del /f sysmain.sd_ >nul
  73. del /f apphelp.sd_ >nul
  74. IF EXIST w2kmain.reg del /f w2kmain.reg >nul
  75. REM Back to original directory
  76. popd
  77. pause