Leaked source code of windows server 2003
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.

66 lines
1.2 KiB

  1. @echo off
  2. @echo Installing AppFix...
  3. REM Temporarily change to the AppPatch directory
  4. pushd %1%
  5. @echo Check OS version...
  6. for /F "delims==[. tokens=1,2,3,4" %%A IN ('ver') DO (
  7. Set OS_MAJOR=%%B
  8. Set OS_MINOR=%%C
  9. )
  10. for /F "tokens=1,2" %%A IN ("%OS_MAJOR%") DO (
  11. Set OS_MAJOR=%%B
  12. )
  13. IF %OS_MAJOR% NEQ 5 (
  14. @echo Bad OS version, this package is for Whistler.
  15. goto Cleanup
  16. )
  17. IF %OS_MINOR% EQU 0 (
  18. @echo Windows2000 detected, this package is for Whistler only.
  19. goto Cleanup
  20. )
  21. @echo Whistler detected
  22. set PATH=%PATH%;%windir%\system32
  23. @echo Replace AppHelp messages...
  24. copy apps.chm %windir%\help\apps.chm
  25. @echo Flush the shim cache...
  26. rundll32 apphelp.dll,ShimFlushCache >nul
  27. @echo Replace the shim databases
  28. chktrust -win2k -acl delta1.cat
  29. chktrust -win2k -acl delta2.cat
  30. fcopy drvmain.sd_ drvmain.sdb
  31. fcopy apphelp.sd_ apphelp.sdb
  32. :Cleanup
  33. @echo Cleanup...
  34. del /f apps.chm > nul
  35. del /f certmgr.exe >nul
  36. del /f testroot.cer >nul
  37. del /f fcopy.exe >nul
  38. del /f drvmain.sd_ >nul
  39. del /f apphelp.sd_ >nul
  40. del /f chktrust.exe >nul
  41. del /f delta*.* >nul
  42. REM Back to original directory
  43. popd
  44. pause