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.

134 lines
4.1 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 copy files from the current user templates to the all users templates location
  13. Rem
  14. If Not Exist "%ALLUSERSPROFILE%\%TEMPLATES%\WINWORD8.DOC" copy "%UserProfile%\%TEMPLATES%\WINWORD8.DOC" "%ALLUSERSPROFILE%\%TEMPLATES%\" /Y >Nul: 2>&1
  15. Rem #########################################################################
  16. Rem #########################################################################
  17. ..\ACRegL %Temp%\O97.Cmd O97INST "HKLM\Software\Microsoft\Office\8.0" "BinDirPath" "STRIPCHAR\1"
  18. If Not ErrorLevel 1 Goto Cont0
  19. Echo.
  20. Echo Unable to retrieve Word 97 installation location from the registry.
  21. Echo Verify that Word 97 has already been installed and run this script
  22. Echo again.
  23. Echo.
  24. Pause
  25. Goto Done
  26. :Cont0
  27. Call %Temp%\O97.Cmd
  28. Del %Temp%\O97.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.
  33. Rem
  34. If Exist "%COMMON_STARTUP%\Microsoft Find Fast.lnk" Del "%COMMON_STARTUP%\Microsoft Find Fast.lnk" >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. ChgUsr /query > Nul:
  42. if Not ErrorLevel 101 Goto Begin
  43. Set __OrigMode=Exec
  44. Change User /Install > Nul:
  45. :Begin
  46. Set __SharedTools=Shared Tools
  47. If Not "%PROCESSOR_ARCHITECTURE%"=="ALPHA" goto acsrCont1
  48. If Not Exist "%ProgramFiles(x86)%" goto acsrCont1
  49. Set __SharedTools=Shared Tools (x86)
  50. :acsrCont1
  51. ..\acsr "#ROOTDRIVE#" "%RootDrive%" Template\MsWord97.Key MsWord97.Tmp
  52. ..\acsr "#__SharedTools#" "%__SharedTools%" MsWord97.Tmp MsWord97.Tmp2
  53. ..\acsr "#INSTDIR#" "%O97INST%" MsWord97.Tmp2 MsWord97.Tmp3
  54. ..\acsr "#MY_DOCUMENTS#" "%MY_DOCUMENTS%" MsWord97.Tmp3 MsWord97.key
  55. Del MsWord97.Tmp >Nul: 2>&1
  56. Del MsWord97.Tmp2 >Nul: 2>&1
  57. Del MsWord97.Tmp3 >Nul: 2>&1
  58. regini MsWord97.key > Nul:
  59. Rem If original mode was execute, change back to Execute Mode.
  60. If "%__OrigMode%" == "Exec" Change User /Execute > Nul:
  61. Set __OrigMode=
  62. Rem #########################################################################
  63. Rem
  64. Rem Update Wrd97Usr.Cmd to reflect actual installation directory and
  65. Rem add it to the UsrLogn2.Cmd script
  66. Rem
  67. ..\acsr "#INSTDIR#" "%O97INST%" ..\Logon\Template\Wrd97Usr.Cmd ..\Logon\Wrd97Usr.Cmd
  68. FindStr /I Wrd97Usr %SystemRoot%\System32\UsrLogn2.Cmd >Nul: 2>&1
  69. If Not ErrorLevel 1 Goto Skip1
  70. Echo Call Wrd97Usr.Cmd >> %SystemRoot%\System32\UsrLogn2.Cmd
  71. :Skip1
  72. Echo.
  73. Echo To insure proper operation of MS Word 97, users who are
  74. Echo currently logged on must log off and log on again before
  75. Echo running any application.
  76. Echo.
  77. Echo Microsoft Word 97 Multi-user Application Tuning Complete
  78. Rem
  79. Rem Get the permission compatibility mode from the registry.
  80. Rem If TSUserEnabled is 0 we need to warn user to change mode.
  81. Rem
  82. ..\ACRegL "%Temp%\tsuser.Cmd" TSUSERENABLED "HKLM\System\CurrentControlSet\Control\Terminal Server" "TSUserEnabled" ""
  83. If Exist "%Temp%\tsuser.Cmd" (
  84. Call "%Temp%\tsuser.Cmd"
  85. Del "%Temp%\tsuser.Cmd" >Nul: 2>&1
  86. )
  87. If NOT %TSUSERENABLED%==0 goto SkipWarning
  88. Echo.
  89. Echo IMPORTANT!
  90. Echo Terminal Server is currently running in Default Security mode.
  91. Echo This application requires the system to run in Relaxed Security mode
  92. Echo (permissions compatible with Terminal Server 4.0).
  93. Echo Use Terminal Services Configuration to view and change the Terminal
  94. Echo Server security mode.
  95. Echo.
  96. :SkipWarning
  97. Pause
  98. :Done