Source code of Windows XP (NT5)
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.

290 lines
9.0 KiB

  1. @Echo Off
  2. Rem
  3. Rem �`�N: CACLS ���O�u���b NTFS �榡���ϺФ��Τ������C
  4. Rem
  5. Rem #########################################################################
  6. Rem
  7. Rem
  8. Call "%SystemRoot%\Application Compatibility Scripts\ChkRoot.Cmd"
  9. If "%_CHKROOT%" == "FAIL" Goto Done
  10. Call "%SystemRoot%\Application Compatibility Scripts\SetPaths.Cmd"
  11. If "%_SETPATHS%" == "FAIL" Goto Done
  12. Rem #########################################################################
  13. Rem
  14. Rem �q�n�������o Visual Studio 6.0 �w�˦��m�C
  15. Rem �p�G�䤣���A�N���] Visual Studio 6.0 �å��w�˨����ܿ��~�T���C
  16. Rem
  17. ..\ACRegL %Temp%\0VC98.Cmd 0VC98 "HKLM\Software\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual C++" "ProductDir" ""
  18. If Not ErrorLevel 1 Goto Cont0
  19. Echo.
  20. Echo �L�k�q�n�������� Visual Studio 6.0 ���w�˦��m�C
  21. Echo �нT�{ Visual Studio 6.0 �O�_�w�w�ˡA�M�᭫�s
  22. Echo �����o�ӫ��O�ɡC
  23. Echo.
  24. Pause
  25. Goto Done
  26. :Cont0
  27. Call %Temp%\0VC98.Cmd
  28. Del %Temp%\0VC98.Cmd >Nul: 2>&1
  29. Rem #########################################################################
  30. Rem
  31. Rem �ܧ��n�����X�A�N���|�����ϥΪ̫��w�ؿ��C
  32. Rem
  33. Rem �p�G�ثe���O�w�˼Ҧ��A�N�ܧ󦨦w�˼Ҧ��C
  34. Set __OrigMode=Install
  35. ChgUsr /query > Nul:
  36. if Not ErrorLevel 101 Goto Begin
  37. Set __OrigMode=Exec
  38. Change User /Install > Nul:
  39. :Begin
  40. ..\acsr "#ROOTDRIVE#" "%RootDrive%" Template\msvs6.Key %temp%\msvs6.tmp
  41. ..\acsr "#MY_DOCUMENTS#" "%MY_DOCUMENTS%" %temp%\msvs6.tmp %temp%\msvs6.tmp2
  42. ..\acsr "#APP_DATA#" "%APP_DATA%" %temp%\msvs6.tmp2 msvs6.key
  43. Del %temp%\msvs6.tmp >Nul: 2>&1
  44. Del %temp%\msvs6.tmp2 >Nul: 2>&1
  45. regini msvs6.key > Nul:
  46. Rem �p�G���ӬO�����Ҧ��A�N�N�ܦ^�����Ҧ��C
  47. If "%__OrigMode%" == "Exec" Change User /Execute > Nul:
  48. Set __OrigMode=
  49. Rem #########################################################################
  50. Rem Create the user logon file for Visual Studio app
  51. Echo Rem >..\logon\VS6USR.Cmd
  52. Rem #########################################################################
  53. Rem ���C�ӨϥΪ̫إ� Visual Studio �M�ץؿ��C
  54. Echo Rem >>..\logon\VS6USR.Cmd
  55. Echo Rem Create per user Visual Studio projects directory>>..\logon\VS6USR.Cmd
  56. Echo call TsMkUDir "%RootDrive%\%MY_DOCUMENTS%\Visual Studio Projects">>..\logon\VS6USR.Cmd
  57. Echo Rem >>..\logon\VS6USR.Cmd
  58. Rem #########################################################################
  59. Rem
  60. Rem �q�n�������o Visual Studio 6.0 Entreprise Edition Tools �w�˦��m�C
  61. Rem �p�G�䤣���A�N���] Visual Studio 6.0 �å��w�˨����ܿ��~�T���C
  62. Rem �p�G���� US �����A���|�]�t <VStudioPath>\Common\Tools
  63. Rem
  64. ..\ACRegL %Temp%\VSEET.Cmd VSEET "HKLM\Software\Microsoft\VisualStudio\6.0\Setup\Microsoft VSEE Client" "ProductDir" ""
  65. If Not ErrorLevel 1 Goto VSEET0
  66. Goto VSEETDone
  67. :VSEET0
  68. Call %Temp%\VSEET.Cmd
  69. Del %Temp%\VSEET.Cmd >Nul: 2>&1
  70. If Not Exist "%VSEET%\APE\AEMANAGR.INI" Goto VSEETDone
  71. ..\acsr "=AE.LOG" "=%RootDrive%\AE.LOG" "%VSEET%\APE\AEMANAGR.INI" "%VSEET%\APE\AEMANAGR.TMP"
  72. If Exist "%VSEET%\APE\AEMANAGRINI.SAV" Del /F /Q "%VSEET%\APE\AEMANAGRINI.SAV"
  73. ren "%VSEET%\APE\AEMANAGR.INI" "AEMANAGRINI.SAV"
  74. ren "%VSEET%\APE\AEMANAGR.TMP" "AEMANAGR.INI"
  75. Echo Rem Copy APE ini file to the user windows directory >>..\logon\VS6USR.Cmd
  76. Echo Rem >>..\logon\VS6USR.Cmd
  77. Echo If Exist "%RootDrive%\Windows\AEMANAGR.INI" Goto UVSEET0 >>..\logon\VS6USR.Cmd
  78. Echo If Exist "%VSEET%\APE\AEMANAGR.INI" Copy "%VSEET%\APE\AEMANAGR.INI" "%RootDrive%\Windows\AEMANAGR.INI" >Nul: 2>&1 >>..\logon\VS6USR.Cmd
  79. Echo Rem >>..\logon\VS6USR.Cmd
  80. Echo :UVSEET0>>..\logon\VS6USR.Cmd
  81. Echo Rem Copy Visual Modeler ini file to the user windows directory >>..\logon\VS6USR.Cmd
  82. Echo Rem >>..\logon\VS6USR.Cmd
  83. Echo If Exist "%RootDrive%\Windows\ROSE.INI" Goto UVSEET1 >>..\logon\VS6USR.Cmd
  84. Echo If Exist "%VSEET%\VS-Ent98\Vmodeler\ROSE.INI" Copy "%VSEET%\VS-Ent98\Vmodeler\ROSE.INI" "%RootDrive%\Windows\ROSE.INI" >Nul: 2>&1 >>..\logon\VS6USR.Cmd
  85. Echo Rem >>..\logon\VS6USR.Cmd
  86. Echo :UVSEET1>>..\logon\VS6USR.Cmd
  87. :VSEETDone
  88. Rem #########################################################################
  89. Rem
  90. Rem �N VS6USR.Cmd �[�J UsrLogn2.Cmd ���O�ɡC
  91. Rem
  92. FindStr /I VS6USR %SystemRoot%\System32\UsrLogn2.Cmd >Nul: 2>&1
  93. If Not ErrorLevel 1 Goto Skip1
  94. Echo Call VS6USR.Cmd >> %SystemRoot%\System32\UsrLogn2.Cmd
  95. :Skip1
  96. Rem #########################################################################
  97. Rem ���o Visual foxPro ���~�w�˥ؿ�
  98. ..\ACRegL %Temp%\VFP98TMP.Cmd VFP98DIR "HKLM\Software\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual FoxPro" "ProductDir" ""
  99. Rem �p�G Visual FoxPro �å��w�ˡA�N���L�ΨӲM�����{���X�C
  100. If ErrorLevel 1 goto Skip2
  101. Rem #########################################################################
  102. Rem
  103. Rem �q�n�������o�ۭq�ؿ����X�C
  104. Rem
  105. Set __SharedTools=Shared Tools
  106. If Not "%PROCESSOR_ARCHITECTURE%"=="ALPHA" goto VFP98L2
  107. If Not Exist "%ProgramFiles(x86)%" goto VFP98L2
  108. Set __SharedTools=Shared Tools (x86)
  109. :VFP98L2
  110. ..\ACRegL %Temp%\VFP98TMP.Cmd VFP98DIC "HKLM\Software\Microsoft\%__SharedTools%\Proofing Tools\Custom Dictionaries" "1" ""
  111. If Not ErrorLevel 1 Goto VFP98L3
  112. Echo.
  113. Rem �L�k�q�n�������ȴN�إߥ��C
  114. Echo.
  115. Rem �إ� VFP98TMP.key �ɮסC
  116. Echo HKEY_LOCAL_MACHINE\Software\Microsoft\%__SharedTools%\Proofing Tools\Custom Dictionaries> %Temp%\VFP98TMP.key
  117. Echo 1 = REG_SZ "%RootDrive%\%MY_DOCUMENTS%\Custom.Dic">> %Temp%\VFP98TMP.key
  118. Rem �إ߭�
  119. regini %Temp%\VFP98TMP.key > Nul:
  120. Del %Temp%\VFP98TMP.key >Nul: 2>&1
  121. Echo set VFP98DIC=%RootDrive%\%MY_DOCUMENTS%\Custom.Dic>%Temp%\VFP98TMP.Cmd
  122. :VFP98L3
  123. Call %Temp%\VFP98TMP.Cmd
  124. Del %Temp%\VFP98TMP.Cmd >Nul: 2>&1
  125. Rem #########################################################################
  126. Rem �إ� Visual FoxPro app ���ϥΪ̵n�J�ɮ�
  127. Echo Rem >..\logon\VFP98USR.Cmd
  128. Rem #########################################################################
  129. Rem Create per user Visual FoxPro directories
  130. Echo Rem >>..\logon\VFP98USR.Cmd
  131. Echo Rem Create a per user Visual FoxPro directory (VFP98)>>..\logon\VFP98USR.Cmd
  132. Echo call TsMkUDir %RootDrive%\VFP98>>..\logon\VFP98USR.Cmd
  133. Echo Rem >>..\logon\VFP98USR.Cmd
  134. Echo Rem Create a per user Visual FoxPro distrib directory >>..\logon\VFP98USR.Cmd
  135. Echo call TsMkUDir %RootDrive%\VFP98\DISTRIB>>..\logon\VFP98USR.Cmd
  136. Echo Rem >>..\logon\VFP98USR.Cmd
  137. Echo Rem #########################################################################>>..\logon\VFP98USR.Cmd
  138. Echo Rem Create the custom dictionary if it doesn't exist.>>..\logon\VFP98USR.Cmd
  139. Echo Rem >>..\logon\VFP98USR.Cmd
  140. Echo If Exist "%VFP98DIC%" Goto VFP98L2 >>..\logon\VFP98USR.Cmd
  141. Echo Copy Nul: "%VFP98DIC%" >Nul: 2>&1 >>..\logon\VFP98USR.Cmd
  142. Echo :VFP98L2 >>..\logon\VFP98USR.Cmd
  143. Rem #########################################################################
  144. Rem Get the Visual foxPro product install directory
  145. ..\ACRegL %Temp%\VFP98TMP.Cmd VFP98DIR "HKLM\Software\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual FoxPro" "ProductDir" ""
  146. If Not ErrorLevel 1 Goto VFP98L4
  147. Del ..\logon\VFP98USR.Cmd >Nul: 2>&1
  148. Echo.
  149. Echo �L�k�q�n�������� Visual Studio 6.0 ���w�˦��m�C
  150. Echo �нT�{ Visual Studio 6.0 �O�_�w�w�ˡA�M�᭫�s
  151. Echo �����o�ӫ��O�ɡC
  152. Echo.
  153. Pause
  154. Goto Skip2
  155. :VFP98L4
  156. Call "%Temp%\VFP98TMP.Cmd"
  157. Del "%Temp%\VFP98TMP.Cmd"
  158. Rem #########################################################################
  159. Rem �b WZSETUP.INI �ɮפ��]�w�U�C���X�C
  160. Rem
  161. If Exist "%VFP98DIR%\WZSETUP.INI" Goto VFP98L5
  162. Echo [Preferences] >"%VFP98DIR%\WZSETUP.INI"
  163. Echo DistributionDirectory=%RootDrive%\VFP98\DISTRIB >>"%VFP98DIR%\WZSETUP.INI"
  164. :VFP98L5
  165. Rem #########################################################################
  166. Rem
  167. Rem Change Registry Keys to make paths point to user specific
  168. Rem directories.
  169. Rem
  170. Rem First Create VFP98TMP.key file
  171. Echo HKEY_CURRENT_USER\Software\Microsoft\VisualFoxPro\6.0\Options> %Temp%\VFP98TMP.key
  172. Echo DEFAULT = REG_SZ "%RootDrive%\VFP98">> %Temp%\VFP98TMP.key
  173. Echo SetDefault = REG_SZ "1">> %Temp%\VFP98TMP.key
  174. Echo ResourceTo = REG_SZ "%RootDrive%\VFP98\FOXUSER.DBF">> %Temp%\VFP98TMP.key
  175. Echo ResourceOn = REG_SZ "1">> %Temp%\VFP98TMP.key
  176. Rem �p�G�ثe���O�w�˼Ҧ��A�N�ܧ󦨦w�˼Ҧ��C
  177. Set __OrigMode=Install
  178. ChgUsr /query > Nul:
  179. if Not ErrorLevel 101 Goto VFP98L6
  180. Set __OrigMode=Exec
  181. Change User /Install > Nul:
  182. :VFP98L6
  183. regini %Temp%\VFP98TMP.key > Nul:
  184. Rem �p�G���ӬO�����Ҧ��A�N�N�ܦ^�����Ҧ��C
  185. If "%__OrigMode%" == "Exec" Change User /Execute > Nul:
  186. Set __OrigMode=
  187. Del %Temp%\VFP98TMP.key >Nul: 2>&1
  188. Rem #########################################################################
  189. Rem
  190. Rem �N VFP98USR.Cmd �[�J UsrLogn2.Cmd ���O��
  191. Rem
  192. FindStr /I VFP98USR %SystemRoot%\System32\UsrLogn2.Cmd >Nul: 2>&1
  193. If Not ErrorLevel 1 Goto Skip2
  194. Echo Call VFP98USR.Cmd >> %SystemRoot%\System32\UsrLogn2.Cmd
  195. :Skip2
  196. If Exist "%Temp%\VFP98TMP.Cmd" Del "%Temp%\VFP98TMP.Cmd"
  197. Rem #########################################################################
  198. Rem
  199. Rem �»P TS �ϥΪ��v�����ܧ� repostry �ؿ��A
  200. Rem �H�K�ϥ� Visual Component Manager�C
  201. Rem
  202. If Exist "%SystemRoot%\msapps\repostry" cacls "%SystemRoot%\msapps\repostry" /E /G "Terminal Server User":C >NUL: 2>&1
  203. Rem #########################################################################
  204. Echo.
  205. Echo ���F���� Visual Studio 6.0 ���T�ާ@�A�ثe�w
  206. Echo �n�J���ϥΪ̥������n�X�A�A���s�n�J�A�~������
  207. Echo Visual Studio 6.0 ���ε{���C
  208. Echo.
  209. Echo Microsoft Visual Studio 6.0 �h�ϥΪ����ε{���վ��B�z����
  210. Pause
  211. :done