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.

159 lines
5.4 KiB

  1. @Echo Off
  2. Cls
  3. Call "%SystemRoot%\Application Compatibility Scripts\ChkRoot.Cmd"
  4. If "%_CHKROOT%" == "FAIL" Goto Done
  5. Echo.
  6. Echo Before running this script, the Administrator should change the Access working
  7. Echo directory to the user's Office private directory.
  8. Echo.
  9. Echo If this is done, press any key to continue.
  10. Echo.
  11. Echo Otherwise, the Administrator should perform the following steps:
  12. Echo Start MS Access and choose Options from View menu
  13. Echo Change the "Default Database Directory" to be "%RootDrive%\OFFICE43"
  14. Echo Exit MS Access
  15. Echo.
  16. Echo Note: You may need to create a new database to see the View menu.
  17. Echo.
  18. Echo After completing these steps, press any key to continue...
  19. Pause > NUL:
  20. Echo.
  21. Echo You need to update Ofc43ins.cmd if you have installed MS Office 4.3 to a
  22. Echo directory other than "%SystemDrive%\MSOFFICE".
  23. Echo.
  24. Echo Press any key to start update Ofc43ins.cmd ...
  25. Echo.
  26. Pause > NUL:
  27. Notepad Ofc43ins.cmd
  28. Pause
  29. Call ofc43ins.cmd
  30. ..\acsr "#OFC43INST#" "%OFC43INST%" ..\Logon\Template\ofc43usr.cmd ..\Logon\ofc43usr.cmd
  31. ..\acsr "#SYSTEMROOT#" "%SystemRoot%" ..\Logon\Template\ofc43usr.key ..\Logon\Template\ofc43usr.bak
  32. ..\acsr "#OFC43INST#" "%OFC43INST%" ..\Logon\Template\ofc43usr.bak ..\Logon\ofc43usr.key
  33. Del /F /Q ..\Logon\Template\ofc43usr.bak
  34. Rem
  35. Rem NOTE: The CACLS commands in this script are only effective
  36. Rem on NTFS formatted partitions.
  37. Rem
  38. Rem If not currently in Install Mode, change to Install Mode.
  39. Set __OrigMode=Install
  40. ChgUsr /query > Nul:
  41. if Not ErrorLevel 101 Goto Begin
  42. Set __OrigMode=Exec
  43. Change User /Install > Nul:
  44. :Begin
  45. regini Office43.key > Nul:
  46. Rem If original mode was execute, change back to Execute Mode.
  47. If "%__OrigMode%" == "Exec" Change User /Execute > Nul:
  48. Set __OrigMode=
  49. Rem
  50. Rem Update the INI files for the Office 4.3
  51. Rem
  52. Rem Set the working directory in msoffice.ini for Excel when it is started from
  53. Rem the Office Toolbar. The standard config for the Office Toolbar puts Excel
  54. Rem in the second position after Word. msoffice.ini will be created under
  55. Rem %SystemRoot% if it doesn't already exist
  56. ..\Aciniupd /e "Msoffice.ini" "ToolbarOrder" "MSApp1" "1,1,"
  57. ..\Aciniupd /e "Msoffice.ini" "ToolbarOrder" "MSApp2" "2,1,,%RootDrive%\office43"
  58. ..\Aciniupd /e "Winword6.ini" "Microsoft Word" USER-DOT-PATH "%RootDrive%\OFFICE43\WINWORD"
  59. ..\Aciniupd /e "Winword6.ini" "Microsoft Word" WORKGROUP-DOT-PATH "%OFC43INST%\WINWORD\TEMPLATE"
  60. ..\Aciniupd /e "Winword6.ini" "Microsoft Word" INI-PATH "%RootDrive%\OFFICE43\WINWORD"
  61. ..\Aciniupd /e "Winword6.ini" "Microsoft Word" DOC-PATH "%RootDrive%\OFFICE43"
  62. ..\Aciniupd /e "Winword6.ini" "Microsoft Word" AUTOSAVE-PATH "%RootDrive%\OFFICE43"
  63. ..\Aciniupd /e "Excel5.ini" "Microsoft Excel" DefaultPath "%RootDrive%\OFFICE43"
  64. ..\Aciniupd /e "Excel5.ini" "Spell Checker" "Custom Dict 1" "%RootDrive%\OFFICE43\Custom.dic"
  65. ..\Aciniupd /k "Msacc20.ini" Libraries "WZTABLE.MDA" "%RootDrive%\OFFICE43\ACCESS\WZTABLE.MDA"
  66. ..\Aciniupd /k "Msacc20.ini" Libraries "WZLIB.MDA" "%RootDrive%\OFFICE43\ACCESS\WZLIB.MDA"
  67. ..\Aciniupd /k "Msacc20.ini" Libraries "WZBLDR.MDA" "%RootDrive%\OFFICE43\ACCESS\WZBLDR.MDA"
  68. ..\Aciniupd /e "Msacc20.ini" Options "SystemDB" "%RootDrive%\OFFICE43\ACCESS\System.MDA"
  69. Rem
  70. Rem Update the WIN.INI
  71. Rem
  72. ..\Aciniupd /e "Win.ini" "MS Proofing Tools" "Custom Dict 1" "%RootDrive%\OFFICE43\Custom.dic"
  73. Rem
  74. Rem Change the permission of Artgalry folder
  75. Rem
  76. cacls "%SystemRoot%\Msapps\Artgalry" /E /G "Terminal Server User":F > NUL: 2>&1
  77. Rem
  78. Rem Change the permission of MSQuery folder
  79. Rem
  80. cacls "%SystemRoot%\Msapps\MSQUERY" /E /G "Terminal Server User":C > NUL: 2>&1
  81. Rem
  82. Rem Copy the Msacc20.ini to the Admin's windows directory since Admin has an old copy.
  83. Rem
  84. Copy "%SystemRoot%\Msacc20.ini" "%UserProfile%\Windows\" > NUL: 2>&1
  85. Rem Create a dummy file so that the installer won't get registry keys propagated.
  86. Copy NUL: "%UserProfile%\Windows\Ofc43usr.dmy" > NUL: 2>&1
  87. attrib +h "%UserProfile%\Windows\Ofc43usr.dmy" > NUL: 2>&1
  88. FindStr /I Ofc43Usr %SystemRoot%\System32\UsrLogn2.Cmd >Nul: 2>&1
  89. If Not ErrorLevel 1 Goto cont2
  90. Echo Call Ofc43Usr.Cmd >> %SystemRoot%\System32\UsrLogn2.Cmd
  91. :cont2
  92. Echo.
  93. Echo The administrator should log off and log on again to make the changes take effect.
  94. Echo After log on, the administrator should also perform the following steps to
  95. Echo initialize the Clip Art Gallery:
  96. Echo Run Word and select Insert Object.
  97. Echo Choose Microsoft ClipArt Gallery.
  98. Echo Press OK to import the clipart shown.
  99. Echo Quit the ClipArt Gallery and Word.
  100. Echo.
  101. Echo Microsoft Office 4.3 Multi-user Application Tuning Complete.
  102. Echo.
  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