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.

173 lines
4.9 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 Get the installation location of Outlook 98 from the registry. If
  13. Rem not found, assume Outlook isn't installed and display an error message.
  14. Rem
  15. ..\ACRegL %Temp%\O98.Cmd O98INST "HKLM\Software\Microsoft\Office\8.0\Common\InstallRoot" "OfficeBin" "Stripchar\1"
  16. If Not ErrorLevel 1 Goto Cont0
  17. Echo.
  18. Echo Unable to retrieve Outlook 98 installation location from the registry.
  19. Echo Verify that Outlook 98 has already been installed and run this script
  20. Echo again.
  21. Echo.
  22. Pause
  23. Goto Done
  24. :Cont0
  25. Call %Temp%\O98.Cmd
  26. Del %Temp%\O98.Cmd >Nul: 2>&1
  27. Rem #########################################################################
  28. Rem
  29. Rem Change Registry Keys to make paths point to user specific
  30. Rem directories.
  31. Rem
  32. Rem If not currently in Install Mode, change to Install Mode.
  33. Set __OrigMode=Install
  34. ChgUsr /query > Nul:
  35. if Not ErrorLevel 101 Goto Begin
  36. Set __OrigMode=Exec
  37. Change User /Install > Nul:
  38. :Begin
  39. REM
  40. REM If Office97 is installed or Office not installed, use Office97 per-user dir
  41. REM If Office95 is installed, use Office95 per-user dir
  42. REM
  43. Set OffUDir=Office97
  44. ..\ACRegL %Temp%\Off.Cmd OFFINST "HKLM\Software\Microsoft\Office\8.0\Common\InstallRoot" "" ""
  45. If Not ErrorLevel 1 Goto OffChk
  46. ..\ACRegL %Temp%\Off.Cmd OFFINST "HKLM\Software\Microsoft\Microsoft Office\95\InstallRoot" "" ""
  47. If Not ErrorLevel 1 Goto Off95
  48. ..\ACRegL %Temp%\Off.Cmd OFFINST "HKLM\Software\Microsoft\Microsoft Office\95\InstallRootPro" "" ""
  49. If Not ErrorLevel 1 Goto Off95
  50. set OFFINST=%O98INST%
  51. goto Cont1
  52. :Off95
  53. Set OffUDir=Office95
  54. :OffChk
  55. Call %Temp%\Off.Cmd
  56. Del %Temp%\Off.Cmd >Nul: 2>&1
  57. :Cont1
  58. ..\acsr "#ROOTDRIVE#" "%RootDrive%" Template\Outlk98.Key Outlk98.Tmp
  59. ..\acsr "#INSTDIR#" "%OFFINST%" Outlk98.Tmp Outlk98.Tmp2
  60. ..\acsr "#OFFUDIR#" "%OffUDir%" Outlk98.Tmp2 Outlk98.Tmp3
  61. ..\acsr "#MY_DOCUMENTS#" "%MY_DOCUMENTS%" Outlk98.Tmp3 Outlk98.Key
  62. Del Outlk98.Tmp >Nul: 2>&1
  63. Del Outlk98.Tmp2 >Nul: 2>&1
  64. Del Outlk98.Tmp3 >Nul: 2>&1
  65. regini Outlk98.key > Nul:
  66. Rem If original mode was execute, change back to Execute Mode.
  67. If "%__OrigMode%" == "Exec" Change User /Execute > Nul:
  68. Set __OrigMode=
  69. Rem #########################################################################
  70. Rem
  71. Rem Update Olk98Usr.Cmd to reflect actual installation directory and
  72. Rem add it to the UsrLogn2.Cmd script
  73. Rem
  74. ..\acsr "#INSTDIR#" "%OFFINST%" ..\Logon\Template\Olk98Usr.Cmd Olk98Usr.Tmp
  75. ..\acsr "#OFFUDIR#" "%OffUDir%" Olk98Usr.Tmp ..\Logon\Olk98Usr.Cmd
  76. Del Olk98Usr.Tmp
  77. FindStr /I Olk98Usr %SystemRoot%\System32\UsrLogn2.Cmd >Nul: 2>&1
  78. If Not ErrorLevel 1 Goto Skip1
  79. Echo Call Olk98Usr.Cmd >> %SystemRoot%\System32\UsrLogn2.Cmd
  80. :Skip1
  81. Rem #########################################################################
  82. Rem
  83. Rem Create a msremote.sfs directory under SystemRoot. This allows users to
  84. Rem use the "Mail and Fax" icon in the control panel to create a profile.
  85. Rem
  86. md %systemroot%\msremote.sfs > Nul: 2>&1
  87. Rem #########################################################################
  88. Rem #########################################################################
  89. Rem #########################################################################
  90. Rem
  91. Rem Create a msfslog.txt file under SystemRoot and give Terminal Server Users
  92. Rem full permissions on this file.
  93. Rem
  94. If Exist %systemroot%\MSFSLOG.TXT Goto MsfsACLS
  95. Copy Nul: %systemroot%\MSFSLOG.TXT >Nul: 2>&1
  96. :MsfsACLS
  97. Echo.
  98. Echo To insure proper operation of Outlook 98, users who are
  99. Echo currently logged on must log off and log on again before
  100. Echo running Outlook 98.
  101. Echo.
  102. Echo Microsoft Outlook 98 Multi-user Application Tuning Complete
  103. Rem
  104. Rem Get the permission compatibility mode from the registry.
  105. Rem If TSUserEnabled is 0 we need to warn user to change mode.
  106. Rem
  107. ..\ACRegL "%Temp%\tsuser.Cmd" TSUSERENABLED "HKLM\System\CurrentControlSet\Control\Terminal Server" "TSUserEnabled" ""
  108. If Exist "%Temp%\tsuser.Cmd" (
  109. Call "%Temp%\tsuser.Cmd"
  110. Del "%Temp%\tsuser.Cmd" >Nul: 2>&1
  111. )
  112. If NOT %TSUSERENABLED%==0 goto SkipWarning
  113. Echo.
  114. Echo IMPORTANT!
  115. Echo Terminal Server is currently running in Default Security mode.
  116. Echo This application requires the system to run in Relaxed Security mode
  117. Echo (permissions compatible with Terminal Server 4.0).
  118. Echo Use Terminal Services Configuration to view and change the Terminal
  119. Echo Server security mode.
  120. Echo.
  121. :SkipWarning
  122. Pause
  123. :done