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.

174 lines
5.8 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 Office 95 from the registry. If
  13. Rem not found, assume Office isn't installed and display an error message.
  14. Rem
  15. ..\ACRegL %Temp%\O95.Cmd O95INST "HKLM\Software\Microsoft\Microsoft Office\95\InstallRoot" "" ""
  16. If Not ErrorLevel 1 Goto Cont0
  17. ..\ACRegL %Temp%\O95.Cmd O95INST "HKLM\Software\Microsoft\Microsoft Office\95\InstallRootPro" "" ""
  18. If Not ErrorLevel 1 Goto Cont0
  19. Echo.
  20. Echo Unable to retrieve Office 95 installation location from the registry.
  21. Echo Verify that Office 95 has already been installed and run this script
  22. Echo again.
  23. Echo.
  24. Pause
  25. Goto Done
  26. :Cont0
  27. Call %Temp%\O95.Cmd
  28. Del %Temp%\O95.Cmd >Nul: 2>&1
  29. Rem #########################################################################
  30. Rem
  31. Rem Remove Find Fast from the Startup menu for all users. Find Fast
  32. Rem is resource intensive and will impact system performance. Need to
  33. Rem check both the current user menu and the all users menu. Which menu
  34. Rem it may appear on depends on whether the system has returned to execute
  35. Rem mode.
  36. Rem
  37. If Not Exist "%USER_STARTUP%\Microsoft Office Find Fast Indexer.lnk" Goto Cont1
  38. Del "%USER_STARTUP%\Microsoft Office Find Fast Indexer.lnk" >Nul: 2>&1
  39. :Cont1
  40. If Not Exist "%COMMON_STARTUP%\Microsoft Office Find Fast Indexer.lnk" Goto Cont2
  41. Del "%COMMON_STARTUP%\Microsoft Office Find Fast Indexer.lnk" >Nul: 2>&1
  42. :Cont2
  43. Rem #########################################################################
  44. Rem
  45. Rem Copy the PowerPoint and Binder files to the All Users directory, so they
  46. Rem can be copied to each user's home directory when user's login
  47. Rem
  48. If Not Exist "%ALLUSERSPROFILE%\%TEMPLATES%\BINDER70.OBD" copy "%UserProfile%\%TEMPLATES%\BINDER70.OBD" "%ALLUSERSPROFILE%\%TEMPLATES%\" /Y >Nul: 2>&1
  49. If Not Exist "%ALLUSERSPROFILE%\%TEMPLATES%\PPT70.PPT" copy "%UserProfile%\%TEMPLATES%\PPT70.PPT" "%ALLUSERSPROFILE%\%TEMPLATES%" /Y >Nul: 2>&1
  50. Rem #########################################################################
  51. Rem
  52. Rem Change Registry Keys to make paths point to user specific directories.
  53. Rem
  54. Rem If not currently in Install Mode, change to Install Mode.
  55. Set __OrigMode=Install
  56. ChgUsr /query > Nul:
  57. if Not ErrorLevel 101 Goto Begin
  58. Set __OrigMode=Exec
  59. Change User /Install > Nul:
  60. :Begin
  61. Set __SharedTools=Shared Tools
  62. If Not "%PROCESSOR_ARCHITECTURE%"=="ALPHA" goto acsrCont1
  63. If Not Exist "%ProgramFiles(x86)%" goto acsrCont1
  64. Set __SharedTools=Shared Tools (x86)
  65. :acsrCont1
  66. ..\acsr "#ROOTDRIVE#" "%RootDrive%" Template\Office95.Key Office95.Tmp
  67. ..\acsr "#__SharedTools#" "%__SharedTools%" Office95.Tmp Office95.Tmp2
  68. ..\acsr "#INSTDIR#" "%O95INST%" Office95.Tmp2 Office95.Tmp3
  69. ..\acsr "#MY_DOCUMENTS#" "%MY_DOCUMENTS%" Office95.Tmp3 Office95.Key
  70. Del Office95.Tmp >Nul: 2>&1
  71. Del Office95.Tmp2 >Nul: 2>&1
  72. Del Office95.Tmp3 >Nul: 2>&1
  73. regini Office95.key > Nul:
  74. ..\acsr "#ROOTDRIVE#" "%RootDrive%" Template\ODBC.Key ODBC.Key
  75. regini ODBC.Key > Nul:
  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 Update Ofc95Usr.Cmd to reflect actual installation directory and
  82. Rem add it to the UsrLogn2.Cmd script
  83. Rem
  84. ..\acsr "#INSTDIR#" "%O95INST%" ..\Logon\Template\Ofc95Usr.Cmd ..\Logon\Ofc95Usr.Cmd
  85. FindStr /I Ofc95Usr %SystemRoot%\System32\UsrLogn2.Cmd >Nul: 2>&1
  86. If Not ErrorLevel 1 Goto Skip1
  87. Echo Call Ofc95Usr.Cmd >> %SystemRoot%\System32\UsrLogn2.Cmd
  88. :Skip1
  89. Rem #########################################################################
  90. If Not Exist "%RootDrive%\Windows\ArtGalry.Cag" Goto EchoCont
  91. If Not Exist "%ProgramFiles%\Common Files\Microsoft Shared\Artgalry\ArtGalry.cag" copy "%RootDrive%\Windows\ArtGalry.Cag" "%ProgramFiles%\Common Files\Microsoft Shared\Artgalry" /y
  92. goto EchoCont3
  93. :EchoCont
  94. Echo.
  95. Echo The administrator must perform the following steps to initialize
  96. Echo the Clip Art Gallery:
  97. Echo - Log off and log back on again.
  98. Echo - Run Word and select Insert Object.
  99. Echo - Choose Microsoft ClipArt Gallery.
  100. Echo - Press OK to import the clipart shown.
  101. Echo - Quit the ClipArt Gallery and Word.
  102. Echo - Rerun %systemdir%\Application Compatibility Scripts\Install\Office95.cmd
  103. Echo - Log off.
  104. Echo.
  105. Pause
  106. :EchoCont3
  107. Echo.
  108. Echo To insure proper operation of Office 95, users who are
  109. Echo currently logged on must log off and log on again before
  110. Echo running any Office 95 application.
  111. Echo.
  112. Echo Microsoft Office 95 Multi-user Application Tuning Complete
  113. Rem
  114. Rem Get the permission compatibility mode from the registry.
  115. Rem If TSUserEnabled is 0 we need to warn user to change mode.
  116. Rem
  117. ..\ACRegL "%Temp%\tsuser.Cmd" TSUSERENABLED "HKLM\System\CurrentControlSet\Control\Terminal Server" "TSUserEnabled" ""
  118. If Exist "%Temp%\tsuser.Cmd" (
  119. Call "%Temp%\tsuser.Cmd"
  120. Del "%Temp%\tsuser.Cmd" >Nul: 2>&1
  121. )
  122. If NOT %TSUSERENABLED%==0 goto SkipWarning
  123. Echo.
  124. Echo IMPORTANT!
  125. Echo Terminal Server is currently running in Default Security mode.
  126. Echo This application requires the system to run in Relaxed Security mode
  127. Echo (permissions compatible with Terminal Server 4.0).
  128. Echo Use Terminal Services Configuration to view and change the Terminal
  129. Echo Server security mode.
  130. Echo.
  131. :SkipWarning
  132. Pause
  133. :Done