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.

89 lines
2.4 KiB

  1. @echo off
  2. Rem #########################################################################
  3. Rem
  4. Rem Verify that %RootDrive% has been configured and set it for this script.
  5. Rem
  6. Call "%SystemRoot%\Application Compatibility Scripts\ChkRoot.Cmd"
  7. If "%_CHKROOT%" == "FAIL" Goto Done
  8. Call "%SystemRoot%\Application Compatibility Scripts\SetPaths.Cmd"
  9. If "%_SETPATHS%" == "FAIL" Goto Done
  10. Rem #########################################################################
  11. Rem
  12. Rem Change Registry Keys to make paths point to user specific directories.
  13. Rem
  14. ..\ACRegL %Temp%\Check.Cmd CheckOrg "HKLM\Software\HNC\HNC Path" "ORGUSER" ""
  15. If ErrorLevel 1 Goto cont1
  16. Call %Temp%\Check.Cmd
  17. Del %Temp%\Check.Cmd
  18. echo .
  19. echo This script must run once.
  20. echo if you want to reset HWPW 97, delete registry key in
  21. echo HKLM\Software\HNC\HNC Path
  22. echo .
  23. Goto Done
  24. :cont1
  25. ..\ACRegL %Temp%\UserPath.Cmd ORGUSERPATH "HKLM\Software\HNC\HNC Path" "HNCUSER" ""
  26. If Not ErrorLevel 1 Goto cont2
  27. Echo .
  28. Echo Unable to retrieve HWPW 97 installation location from registry.
  29. Echo Verify that HWPW 97 has already been installed and run this script
  30. Echo again
  31. Goto Done
  32. :cont2
  33. Call %Temp%\UserPath.Cmd
  34. Del %Temp%\UserPath.Cmd >Nul: 2>&1
  35. Rem #########################################################################
  36. Rem
  37. Rem Change Registry Keys to make paths point to user specific directories.
  38. Rem
  39. Rem If not currently in Install Mode, change to Install Mode.
  40. Set __OrigMode=Install
  41. Change User /query > Nul:
  42. if Not ErrorLevel 101 Goto cont3
  43. Set __OrigMode=Exec
  44. Change User /Install > Nul:
  45. :cont3
  46. ..\acsr "#ROOTDRIVE#" %RootDrive% Template\Hwpw97.key Hwpw97.tmp
  47. ..\acsr "#USERPATH#" %OrgUserPath% Hwpw97.tmp Hwpw97.key
  48. Del Hwpw97.tmp >Nul: 2>&1
  49. regini Hwpw97.key > Nul:
  50. Rem If original mode was execute, change back to Execute Mode.
  51. If "%__OrigMode%" == "Exec" Change User /Execute > Nul:
  52. Set __OrigMode=
  53. Rem #########################################################################
  54. Rem
  55. Rem Add Hwp97Usr.Cmd to the UsrLogn2.Cmd Script
  56. Rem
  57. FindStr /I Hwp97usr %SystemRoot%\System32\UsrLogn2.Cmd >Nul: 2>&1
  58. If Not ErrorLevel 1 Goto cont4
  59. Echo Call Hwp97Usr.Cmd >> %SystemRoot%\System32\UsrLogn2.Cmd
  60. :cont4
  61. Echo .
  62. Echo To insure proper operation of HWPW 97, users who are
  63. Echo currently logged on must log off and log on again before
  64. Echo running HWPW 97.
  65. :Done