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.

177 lines
4.8 KiB

  1. @Echo Off
  2. Rem #########################################################################
  3. Rem
  4. Rem Verify that the CMD Extensions are enabled
  5. Rem
  6. if "A%cmdextversion%A" == "AA" (
  7. call cmd /e:on /c eudora4.cmd
  8. ) else (
  9. goto ExtOK
  10. )
  11. goto Done
  12. :ExtOK
  13. Rem #########################################################################
  14. Rem
  15. Rem Verify that %RootDrive% has been configured and set it for this script.
  16. Rem
  17. Call "%SystemRoot%\Application Compatibility Scripts\ChkRoot.Cmd"
  18. If "%_CHKROOT%" == "FAIL" Goto Done
  19. Call "%SystemRoot%\Application Compatibility Scripts\SetPaths.Cmd"
  20. If "%_SETPATHS%" == "FAIL" Goto Done
  21. Rem #########################################################################
  22. Rem Get the Eudora location from the registry
  23. Rem
  24. ..\ACRegL "%Temp%\EPro4.Cmd" EudoraInstDirLong "HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\Eudora.exe" "Path" ""
  25. If Not ErrorLevel 1 Goto Cont1
  26. Echo.
  27. Echo Unable to retrieve Eudora Pro 4.0 installation directory from the registry.
  28. Echo Verify that Eudora Pro 4.0 has already been installed
  29. Echo and run this script again.
  30. Echo.
  31. Pause
  32. Goto Done
  33. :Cont1
  34. Call %Temp%\EPro4.Cmd
  35. Del %Temp%\EPro4.Cmd >Nul: 2>&1
  36. Rem Get rid of a possible trailing \
  37. Set LastChar=%EudoraInstDirLong:~-1%
  38. if not "%LastChar%"=="\" goto ShortName
  39. Set EudoraInstDirLong=%EudoraInstDirLong:~0,-1%
  40. :ShortName
  41. Rem We use the "for" command in a kludgy way, just to get a short pathname (needed for Eudora keys)
  42. Rem Note: the %% syntax is necessary because we are in a cmd file
  43. for %%i in ("%EudoraInstDirLong%") do set EudoraInstDir=%%~si
  44. Echo.
  45. Echo Please do the following operations before resuming this application
  46. Echo compatibility script:
  47. Echo - run Eudora 4.0
  48. Echo - cancel the "New Account Wizard"
  49. Echo - exit Eudora
  50. Echo.
  51. Pause
  52. If Exist "%EudoraInstDir%\descmap.pce" Goto Cont0
  53. Echo.
  54. Echo You MUST run Eudora 4.0 once and then run this script again.
  55. Echo.
  56. Pause
  57. Goto Done
  58. :Cont0
  59. Rem #########################################################################
  60. Rem
  61. Rem Change Registry Keys to make paths point to user specific
  62. Rem directories.
  63. Rem
  64. Rem If not currently in Install Mode, change to Install Mode.
  65. Set __OrigMode=Install
  66. ChgUsr /query > Nul:
  67. if Not ErrorLevel 101 Goto Begin
  68. Set __OrigMode=Exec
  69. Change User /Install > Nul:
  70. :Begin
  71. ..\acsr "#INSTDIR#" "%EudoraInstDir%" Template\Eudora4.Key Eudora4.tmp
  72. ..\acsr "#ROOTDRIVE#" "%RootDrive%" Eudora4.tmp Eudora4.key
  73. regini eudora4.key > Nul:
  74. del eudora4.tmp
  75. del eudora4.key
  76. Rem If original mode was execute, change back to Execute Mode.
  77. If "%__OrigMode%" == "Exec" Change User /Execute > Nul:
  78. Set __OrigMode=
  79. Rem #########################################################################
  80. Rem
  81. Rem Remove "Uninstall Eudora Pro" shortcut from the Start Menu for all users.
  82. Rem
  83. If Not Exist "%COMMON_PROGRAMS%\Eudora Pro\Uninstall Eudora Pro.lnk" Goto Cont2
  84. Del "%COMMON_PROGRAMS%\Eudora Pro\Uninstall Eudora Pro.lnk" >Nul: 2>&1
  85. :Cont2
  86. Rem #########################################################################
  87. If Exist ..\Logon\eud4usr.cmd Goto Cont3
  88. Echo.
  89. Echo Unable to find eud4usr.cmd logon script
  90. Echo %Systemroot%\Application Compatibility Scripts\Logon.
  91. Echo.
  92. Echo Lotus Eudora Pro 4.0 Multi-user Application Tuning Terminated.
  93. Echo.
  94. Pause
  95. Goto done
  96. :Cont3
  97. FindStr /I eud4usr %SystemRoot%\System32\UsrLogn2.Cmd >Nul: 2>&1
  98. If Not ErrorLevel 1 Goto Cont4
  99. Echo Call eud4usr.cmd >> %SystemRoot%\System32\UsrLogn2.Cmd
  100. :Cont4
  101. Rem #########################################################################
  102. Echo.
  103. Echo After running this script, you need to update the properties
  104. Echo of the target for the Eudora Pro shortcut in the folder :
  105. Echo %allusersprofile%\Start Menu\Programs\Eudora Pro
  106. Echo Append the value "%RootDrive%\eudora.ini" to the target.
  107. Echo The shortcut target should then be:
  108. Echo "%EudoraInstDirLong%\Eudora.exe" %RootDrive%\eudora.ini
  109. Echo.
  110. Echo Eudora 4.0 Multi-user Application Tuning Complete
  111. Echo.
  112. Rem
  113. Rem Get the permission compatibility mode from the registry.
  114. Rem If TSUserEnabled is 0 we need to warn user to change mode.
  115. Rem
  116. ..\ACRegL "%Temp%\tsuser.Cmd" TSUSERENABLED "HKLM\System\CurrentControlSet\Control\Terminal Server" "TSUserEnabled" ""
  117. If Exist "%Temp%\tsuser.Cmd" (
  118. Call "%Temp%\tsuser.Cmd"
  119. Del "%Temp%\tsuser.Cmd" >Nul: 2>&1
  120. )
  121. If NOT %TSUSERENABLED%==0 goto SkipWarning
  122. Echo.
  123. Echo IMPORTANT!
  124. Echo Terminal Server is currently running in Default Security mode.
  125. Echo This application requires the system to run in Relaxed Security mode
  126. Echo (permissions compatible with Terminal Server 4.0).
  127. Echo Use Terminal Services Configuration to view and change the Terminal
  128. Echo Server security mode.
  129. Echo.
  130. :SkipWarning
  131. Pause
  132. :done