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.

104 lines
2.1 KiB

  1. @echo Installing AppFix...
  2. set PATH=%PATH%;%windir%\system32
  3. REM Disable SFP (the brute force way)
  4. del %WinDir%\system32\dllcache\sysmain.sdb
  5. del %WinDir%\system32\dllcache\msimain.sdb
  6. del %WinDir%\system32\dllcache\drvmain.sdb
  7. del %WinDir%\system32\dllcache\apphelp.sdb
  8. del %WinDir%\system32\dllcache\acspecfc.dll
  9. del %WinDir%\system32\dllcache\acgenral.dll
  10. del %WinDir%\system32\dllcache\aclayers.dll
  11. del %WinDir%\system32\dllcache\acxtrnal.dll
  12. REM Temporarily change to the AppPatch directory
  13. pushd %1%
  14. REM Quietly delete all DLLs
  15. del /q *.DLL >nul
  16. @echo Delete systest.sdb...
  17. IF EXIST systest.sdb (
  18. del /f systest.sdb >nul
  19. )
  20. @echo Check OS version...
  21. ver | findstr /c:" 5.00." > nul
  22. IF errorlevel 1 goto TryWhistler
  23. IF errorlevel 0 goto Win2k
  24. goto AllDone
  25. :Win2k
  26. @echo Windows2000 detected. This package is for Whistler only !!!
  27. goto Cleanup
  28. :TryWhistler
  29. ver | findstr /c:" 5.1." > nul
  30. IF errorlevel 1 goto Cleanup
  31. IF errorlevel 0 goto Whistler
  32. goto AllDone
  33. :Whistler
  34. @echo Whistler detected
  35. @echo Replace AppHelp messages...
  36. copy apps.chm %windir%\help\apps.chm
  37. @echo Flush the shim cache...
  38. rundll32 apphelp.dll,ShimFlushCache >nul
  39. @echo Install the certificate needed to replace shims...
  40. certmgr.exe -add testroot.cer -r localMachine -s root
  41. @echo Replace the shim databases
  42. chktrust -win2k -acl delta1.cat
  43. chktrust -win2k -acl delta2.cat
  44. chktrust -win2k -acl delta3.cat
  45. fcopy sysmain.sd_ sysmain.sdb
  46. fcopy apphelp.sd_ apphelp.sdb
  47. fcopy msimain.sd_ msimain.sdb
  48. @echo Replace the shim DLLs
  49. fcopy AcLayers.dl_ AcLayers.dll
  50. fcopy AcLua.dl_ AcLua.dll
  51. fcopy AcSpecfc.dl_ AcSpecfc.dll
  52. fcopy AcGenral.dl_ AcGenral.dll
  53. fcopy AcXtrnal.dl_ AcXtrnal.dll
  54. fcopy AcVerfyr.dl_ AcVerfyr.dll
  55. :Cleanup
  56. @echo Cleanup...
  57. del /f apps.chm > nul
  58. del /f certmgr.exe >nul
  59. del /f testroot.cer >nul
  60. del /f fcopy.exe >nul
  61. del /f AcLayers.dl_ >nul
  62. del /f AcLua.dl_ >nul
  63. del /f AcSpecfc.dl_ >nul
  64. del /f AcGenral.dl_ >nul
  65. del /f AcXtrnal.dl_ >nul
  66. del /f AcVerfyr.dl_ >nul
  67. del /f sysmain.sd_ >nul
  68. del /f apphelp.sd_ >nul
  69. del /f msimain.sd_ >nul
  70. del /f chktrust.exe >nul
  71. del /f delta*.* >nul
  72. REM Back to original directory
  73. popd
  74. pause