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.

281 lines
8.9 KiB

  1. @Echo Off
  2. Rem #########################################################################
  3. Rem
  4. Rem �ˬd %RootDrive% �O�_�w�]�w�A�ñN���]�w���o�ӫ��O�ɡC
  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. Set __SharedTools=Shared Tools
  11. If Not "%PROCESSOR_ARCHITECTURE%"=="ALPHA" goto Start0
  12. If Not Exist "%ProgramFiles(x86)%" goto Start0
  13. Set __SharedTools=Shared Tools (x86)
  14. :Start0
  15. Rem #########################################################################
  16. Rem �]�w app VendorName
  17. SET VendorName=Microsoft
  18. Rem #########################################################################
  19. Rem �N�չ��u�����|�]�w�� MS Office 2000 �ϥΪ����|
  20. SET ProofingPath=Proof
  21. Rem #########################################################################
  22. Rem �]�w�ΨӦs�����ε{���w�ˮڥؿ����n�����X�Ψ���
  23. SET AppRegKey=HKLM\Software\Microsoft\Office\8.0\Common\InstallRoot
  24. SET AppRegValue=OfficeBin
  25. Rem #########################################################################
  26. Rem �]�w�ΨӦs�����ε{���d���ؿ����n�����X�Ψ���
  27. SET AppTemplatesRegKey=HKCU\Software\Microsoft\Office\8.0\Common\FileNew\LocalTemplates
  28. SET AppTemplatesRegValue=
  29. Rem #########################################################################
  30. Rem �]�w�ΨӦs�����ε{���ۭq�ؿ����|�W�٪��n�����X�Ψ���
  31. SET AppCustomDicRegKey=HKLM\Software\Microsoft\%__SharedTools%\Proofing Tools\Custom Dictionaries
  32. SET AppCustomDicRegValue=1
  33. Rem #########################################################################
  34. Rem �]�w���w���������ε{���ɮצW�٤θ��|�W��
  35. SET CustomDicFile=Custom.Dic
  36. SET AppPathName=Microsoft Project
  37. SET AppWebPathName=Microsoft Project Web
  38. Rem #########################################################################
  39. Rem �]�w MS Office 2000 �ҨϥΪ��w�]���|
  40. SET AppData=%RootDrive%\%APP_DATA%
  41. SET UserTemplatesPath=%AppData%\%VendorName%\%TEMPLATES%
  42. SET UserCustomDicPath=%AppData%\%VendorName%\%ProofingPath%
  43. Rem #########################################################################
  44. Rem �q�n�������o Project 98 �w�˦��m�C
  45. Rem �p�G�䤣���A���]�o�����ε{���å��w�ˡA�����ܿ��~�T���C
  46. Rem
  47. ..\ACRegL %Temp%\Proj98.Cmd PROJINST "%AppRegKey%" "%AppRegValue%" ""
  48. If Not ErrorLevel 1 Goto Cont0
  49. Echo.
  50. Echo �L�k�q�n�������� Project 98 ���w�˦��m�C
  51. Echo �нT�{ Project 98 �O�_�w�w�ˡA�M�᭫�s
  52. Echo �����o�ӫ��O�ɡC
  53. Echo.
  54. Pause
  55. Goto Done
  56. :Cont0
  57. Call %Temp%\Proj98.Cmd
  58. Del %Temp%\Proj98.Cmd >Nul: 2>&1
  59. ..\ACRegL %Temp%\Proj98.Cmd PROJROOT "%AppRegKey%" "%AppRegValue%" "STRIPCHAR\1"
  60. If Not ErrorLevel 1 Goto Cont01
  61. Echo.
  62. Echo �L�k�q�n�������� Project 98 ���w�˦��m�C
  63. Echo �нT�{ Project 98 �O�_�w�w�ˡA�M�᭫�s
  64. Echo �����o�ӫ��O�ɡC
  65. Echo.
  66. Pause
  67. Goto Done
  68. :Cont01
  69. Call %Temp%\Proj98.Cmd
  70. Del %Temp%\Proj98.Cmd >Nul: 2>&1
  71. Rem #########################################################################
  72. Rem �q�n�������o�d�����|�W��
  73. Rem
  74. ..\ACRegL %Temp%\Proj98.Cmd TemplatesPathName "%AppTemplatesRegKey%" "%AppTemplatesRegValue%" "STRIPPATH"
  75. If Not ErrorLevel 1 Goto Cont02
  76. SET TemplatesPathName=%TEMPLATES%
  77. Goto Cont03
  78. :Cont02
  79. Call %Temp%\Proj98.Cmd
  80. Del %Temp%\Proj98.Cmd >Nul: 2>&1
  81. :Cont03
  82. Rem #########################################################################
  83. Rem �p�G�å��w�� MS Office 97�A�N�ϥιw�]���|
  84. If Not Exist "%RootDrive%\Office97" Goto SetPathNames
  85. Rem #########################################################################
  86. Rem �p�G�w�w�� MS Office 97�A�N�ϥ� MS Office 97 ���|�C
  87. Rem #########################################################################
  88. Rem �q�n�������o�ۭq�r�媺���|�W��
  89. Rem
  90. ..\ACRegL %Temp%\Proj98.Cmd AppData "%AppCustomDicRegKey%" "%AppCustomDicRegValue%" "STRIPCHAR\1"
  91. If Not ErrorLevel 1 Goto Cont04
  92. SET AppData=%RootDrive%\Office97
  93. Goto Cont05
  94. :Cont04
  95. Call %Temp%\Proj98.Cmd
  96. Del %Temp%\Proj98.Cmd >Nul: 2>&1
  97. :Cont05
  98. Rem #########################################################################
  99. Rem �q�n�������o�d�����|�W��
  100. Rem
  101. ..\ACRegL %Temp%\Proj98.Cmd UserTemplatesPath "%AppTemplatesRegKey%" "%AppTemplatesRegValue%" ""
  102. If Not ErrorLevel 1 Goto Cont06
  103. SET UserTemplatesPath=%AppData%\%TemplatesPathName%
  104. Goto Cont07
  105. :Cont06
  106. Call %Temp%\Proj98.Cmd
  107. Del %Temp%\Proj98.Cmd >Nul: 2>&1
  108. :Cont07
  109. SET UserCustomDicPath=%AppData%
  110. :SetPathNames
  111. Rem #########################################################################
  112. Rem �]�w�ϥΪ̤Τ��θ��|�W��
  113. SET CommonCustomDicPath=%PROJINST%
  114. SET CommonTemplatesPath=%PROJROOT%\%TemplatesPathName%
  115. SET UserCustomDicFileName=%UserCustomDicPath%\%CustomDicFile%
  116. SET UserAppTemplatesPath=%UserTemplatesPath%\%AppPathName%
  117. SET UserAppWebTemplatesPath=%UserTemplatesPath%\%AppWebPAthName%
  118. SET CommonAppTemplatesPath=%CommonTemplatesPath%\%AppPathName%
  119. SET CommonAppWebTemplatesPath=%CommonTemplatesPath%\%AppWebPAthName%
  120. Rem #########################################################################
  121. Rem
  122. Rem �p�G Office 97 �w�w�ˡAProject 98 �w�˫��O��
  123. Rem �|�N�d�����ʥثe���ϥΪ̥ؿ��C
  124. Rem �N���̩��b�q�ΰϰ��CProj98Usr.cmd �i�H�N�d�����^���B�C
  125. Rem
  126. If NOT Exist "%UserAppTemplatesPath%" goto skip10
  127. If Exist "%CommonAppTemplatesPath%" goto skip10
  128. xcopy "%UserAppTemplatesPath%" "%CommonAppTemplatesPath%" /E /I /K > Nul: 2>&1
  129. :skip10
  130. If NOT Exist "%UserAppWebTemplatesPath%" goto skip11
  131. If Exist "%CommonAppWebTemplatesPath%" goto skip11
  132. xcopy "%UserAppWebTemplatesPath%" "%CommonAppWebTemplatesPath%" /E /I /K > Nul: 2>&1
  133. :skip11
  134. Rem #########################################################################
  135. Rem
  136. Rem �N Global.mpt �ɮ׳]����Ū�C
  137. Rem �_�h�Ĥ@�ӱҰ� Project ���ϥΪ̷|�ܧ� ACLs�C
  138. Rem
  139. if Exist "%PROJINST%\Global.mpt" attrib +r "%PROJINST%\Global.mpt"
  140. Rem #########################################################################
  141. Rem
  142. Rem ���\�����HŪ���Q Office 97 ���s�L���t�� DLL�C
  143. Rem
  144. If Exist %SystemRoot%\System32\OleAut32.Dll cacls %SystemRoot%\System32\OleAut32.Dll /E /T /G "Authenticated Users":R > NUL: 2>&1
  145. Rem #########################################################################
  146. Rem
  147. Rem �إ� MsForms.Twd �ɮסA���O
  148. Rem Powerpoint �� Excel Add-ins ([�ɮ�] [�x�s�� HTML] ����) �������ɮסC
  149. Rem �����o�������ε{���ɡA���̱N�|�ξA�����ɮרӨ��N�t�����n���ƪ��ɮסC
  150. Rem
  151. If Exist %systemroot%\system32\MsForms.Twd Goto Cont2
  152. Copy Nul: %systemroot%\system32\MsForms.Twd >Nul:
  153. Cacls %systemroot%\system32\MsForms.Twd /E /P "Authenticated Users":F > Nul: 2>&1
  154. :Cont2
  155. Rem #########################################################################
  156. Rem
  157. Rem �q [�Ұ�] �\���������� [�ֳt�M��]�C
  158. Rem [�ֳt�M��] �|�ϥΤj�q�귽�í��C�t�ήį��C
  159. Rem
  160. If Exist "%COMMON_STARTUP%\Microsoft Find Fast.lnk" Del "%COMMON_STARTUP%\Microsoft Find Fast.lnk"
  161. Rem #########################################################################
  162. Rem
  163. Rem �ܧ��n�����X�A�N���|���V�ϥΪ̩ҫ��w��
  164. Rem �ؿ��C
  165. Rem
  166. Rem �p�G�ثe���O�w�˼Ҧ��A�N�ܧ󦨦w�˼Ҧ��C
  167. Set __OrigMode=Install
  168. ChgUsr /query > Nul:
  169. if Not ErrorLevel 101 Goto Begin
  170. Set __OrigMode=Exec
  171. Change User /Install > Nul:
  172. :Begin
  173. ..\acsr "#ROOTDRIVE#" "%RootDrive%" Template\msproj98.Key msproj98.tm1
  174. ..\acsr "#__SharedTools#" "%__SharedTools%" msproj98.tm1 msproj98.tm2
  175. Del msproj98.tm1 >Nul: 2>&1
  176. ..\acsr "#USERCUSTOMDICFILE#" "%UserCustomDicFileName%" msproj98.tm2 msproj98.Key
  177. Del msproj98.tm2 >Nul: 2>&1
  178. regini msproj98.key > Nul:
  179. Rem If original mode was execute, change back to Execute Mode.
  180. If "%__OrigMode%" == "Exec" Change User /Execute > Nul:
  181. Set __OrigMode=
  182. Rem #########################################################################
  183. Rem
  184. Rem ���s proj97Usr.Cmd �ӤϬM���ڪ��w�˥ؿ��A
  185. Rem �ñN���[�J UsrLogn2.Cmd ���O�ɡC
  186. Rem
  187. ..\acsr "#USERTEMPLATESPATH#" "%UserTemplatesPath%" ..\Logon\Template\prj98Usr.Cmd prj98Usr.tm1
  188. ..\acsr "#USERCUSTOMDICPATH#" "%UserCustomDicPath%" prj98Usr.tm1 prj98Usr.tm2
  189. Del prj98Usr.tm1 >Nul: 2>&1
  190. ..\acsr "#COMMONTEMPLATESPATH#" "%CommonTemplatesPath%" prj98Usr.tm2 prj98Usr.tm1
  191. Del prj98Usr.tm2 >Nul: 2>&1
  192. ..\acsr "#COMMONCUSTOMDICPATH#" "%CommonCustomDicPath%" prj98Usr.tm1 prj98Usr.tm2
  193. Del prj98Usr.tm1 >Nul: 2>&1
  194. ..\acsr "#CUSTOMDICNAME#" "%CustomDicFile%" prj98Usr.tm2 prj98Usr.tm1
  195. Del prj98Usr.tm2 >Nul: 2>&1
  196. ..\acsr "#APPPATHNAME#" "%AppPathName%" prj98Usr.tm1 prj98Usr.tm2
  197. Del prj98Usr.tm1 >Nul: 2>&1
  198. ..\acsr "#APPWEBPATHNAME#" "%AppWebPathName%" prj98Usr.tm2 ..\Logon\prj98Usr.Cmd
  199. Del prj98Usr.tm2 >Nul: 2>&1
  200. FindStr /I prj98Usr %SystemRoot%\System32\UsrLogn2.Cmd >Nul: 2>&1
  201. If Not ErrorLevel 1 Goto Skip1
  202. Echo Call prj98Usr.Cmd >> %SystemRoot%\System32\UsrLogn2.Cmd
  203. :Skip1
  204. Rem #########################################################################
  205. Echo.
  206. Echo ���F���� Project 98 ���T�ާ@�A�ثe�w�n
  207. Echo �J���ϥΪ̥������n�X�A�A���s�n�J�A�~��
  208. Echo �������ε{���C
  209. Echo.
  210. Echo Microsoft Project 98 �h�ϥΪ����ε{���վ��B�z����
  211. Pause
  212. :done