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.

198 lines
6.3 KiB

  1. @Echo Off
  2. Rem #########################################################################
  3. Rem
  4. Rem �ˬd CMD Extensions �O�_�w�ҥΡC
  5. Rem
  6. if "A%cmdextversion%A" == "AA" (
  7. call cmd /e:on /c netcom40.cmd
  8. ) else (
  9. goto ExtOK
  10. )
  11. goto Done
  12. :ExtOK
  13. Rem #########################################################################
  14. Rem
  15. Rem �ˬd %RootDrive% �O�_�w�]�w�A�ñN���]�w�����O�ɡC
  16. Rem
  17. Call "%SystemRoot%\Application Compatibility Scripts\ChkRoot.Cmd"
  18. If "%_CHKROOT%" == "FAIL" Goto Done
  19. Call "%SystemRoot%\Application Compatibility Scripts\SetPaths.Cmd"
  20. If "%_SETPATHS%" == "FAIL" Goto Done
  21. Rem #########################################################################
  22. Rem
  23. Rem ���o NetScape ���� (4.5x �M 4.0x �����覡���P)
  24. Rem
  25. ..\ACRegL "%Temp%\NS4VER.Cmd" NS4VER "HKLM\Software\Netscape\Netscape Navigator" "CurrentVersion" "STRIPCHAR(1"
  26. If Not ErrorLevel 1 Goto Cont0
  27. Echo.
  28. Echo �L�k�q�n�������� Netscape Communicator 4 �����C
  29. Echo �нT�{ Communicator �O�_�w�w�ˡA�M�᭫�s����
  30. Echo �o�ӫ��O�ɡC
  31. Echo.
  32. Pause
  33. Goto Done
  34. :Cont0
  35. Call "%Temp%\NS4VER.Cmd"
  36. Del "%Temp%\NS4VER.Cmd" >Nul: 2>&1
  37. if /i "%NS4VER%" LSS "4.5 " goto NS40x
  38. Rem #########################################################################
  39. Rem Netscape 4.5x
  40. Rem
  41. Rem �q�n�������o Netscape Communicator 4.5 �w�˦��m�C
  42. Rem �p�G�䤣���A�N���] Communicator 4.5 �å��w�˨����ܿ��~�T���C
  43. Rem
  44. ..\ACRegL "%Temp%\NS45.Cmd" NS40INST "HKCU\Software\Netscape\Netscape Navigator\Main" "Install Directory" "Stripchar\1"
  45. If Not ErrorLevel 1 Goto Cont1
  46. Echo.
  47. Echo �L�k�q�n�������� Netscape Communicator 4.5 ���w�˦�
  48. Echo �m�C�нT�{ Communicator �O�_�w�w�ˡA�M�᭫�s�����o
  49. Echo �ӫ��O�ɡC
  50. Echo.
  51. Pause
  52. Goto Done
  53. :Cont1
  54. Call "%Temp%\NS45.Cmd"
  55. Del "%Temp%\NS45.Cmd" >Nul: 2>&1
  56. Rem #########################################################################
  57. Rem
  58. Rem Update Com40Usr.Cmd to reflect the default NetScape Users directory and
  59. Rem add it to the UsrLogn2.Cmd script
  60. Rem
  61. ..\acsr "#NSUSERDIR#" "%ProgramFiles%\Netscape\Users" ..\Logon\Template\Com40Usr.Cmd ..\Logon\Com40Usr.tmp
  62. ..\acsr "#NS40INST#" "%NS40INST%" ..\Logon\Com40Usr.tmp ..\Logon\Com40Usr.tm2
  63. ..\acsr "#NS4VER#" "4.5x" ..\Logon\Com40Usr.tm2 ..\Logon\Com40Usr.Cmd
  64. Rem #########################################################################
  65. Rem
  66. Rem �N [�ֳt�Ұ�] �ϥܽƻs�� netscape �w�˥ؿ��A
  67. Rem ���{�������N���̽ƻs���ϥΪ̳]�w�ɥؿ��C
  68. Rem
  69. If Exist "%UserProfile%\%App_Data%\Microsoft\Internet Explorer\Quick Launch\Netscape Composer.lnk" copy "%UserProfile%\%App_Data%\Microsoft\Internet Explorer\Quick Launch\Netscape Composer.lnk" "%NS40INST%"
  70. If Exist "%UserProfile%\%App_Data%\Microsoft\Internet Explorer\Quick Launch\Netscape Messenger.lnk" copy "%UserProfile%\%App_Data%\Microsoft\Internet Explorer\Quick Launch\Netscape Messenger.lnk" "%NS40INST%"
  71. If Exist "%UserProfile%\%App_Data%\Microsoft\Internet Explorer\Quick Launch\Netscape Navigator.lnk" copy "%UserProfile%\%App_Data%\Microsoft\Internet Explorer\Quick Launch\Netscape Navigator.lnk" "%NS40INST%"
  72. goto DoUsrLogn
  73. :NS40x
  74. Rem #########################################################################
  75. Rem Netscape 4.0x
  76. Rem
  77. Rem �q�n�������o Netscape Communicator 4 �w�˦��m�C
  78. Rem �p�G�䤣���A�N���] Communicator 4.5 �å��w�˨����ܿ��~�T���C
  79. Rem
  80. ..\ACRegL "%Temp%\NS40.Cmd" NS40INST "HKCU\Software\Netscape\Netscape Navigator\Main" "Install Directory" ""
  81. If Not ErrorLevel 1 Goto Cont2
  82. Echo.
  83. Echo �L�k�q�n�������� Netscape Communicator 4 �w�˦��m�C
  84. Echo ���ˬd Communicator �O�_�w�g�w�ˡA�í��s�����o�ӫ��O�ɡC
  85. Echo.
  86. Pause
  87. Goto Done
  88. :Cont2
  89. Call "%Temp%\NS40.Cmd"
  90. Del "%Temp%\NS40.Cmd" >Nul: 2>&1
  91. Rem #########################################################################
  92. Rem
  93. Rem �N�w�]���]�w�ɽƻs���t�κ޲z�����D�ؿ��C
  94. Rem �o�ӳ]�w�ɷ|�b�ϥΪ̵n�J�ɳQ�ƻs���ϥΪ̥D�ؿ����C
  95. Rem �p�G�q�Ϊ��w�]�]�w�ɤw�g�s�b�A�Ф��n�мg���C
  96. Rem �_�h Admin �i�H�b�y�԰����o�ӫ��O�ɡA�ñN�Ҧ�
  97. Rem �L���ӤH���T�����q�ιw�]�]�w�ɡC
  98. Rem
  99. If Exist %RootDrive%\NS40 Goto Cont3
  100. Echo.
  101. Echo �b %RootDrive%\NS40 ���䤣���w�]�]�w�ɡC�а���
  102. Echo [�ϥΪ̳]�w�ɺ޲z��]�A�ëإߤ@�ӦW�٬� "Default"
  103. Echo �����@�]�w�ɡC�����ܿ��J�]�w�ɸ��|�ɡA�ШϥΤW��
  104. Echo �����ܪ����|�C�бN�Ҧ����W�٤ιq�l�l���W�ٶ��ثO�d
  105. Echo �ťաC�p�G�����L�]�w�ɦs�b�A�ЧR�����̡C�b�z�����o
  106. Echo �ǨB�J���A�Э��s�����o�ӫ��O�ɡC
  107. Echo.
  108. Pause
  109. Goto Done
  110. :Cont3
  111. If Exist "%NS40INST%\DfltProf" Goto Cont4
  112. Xcopy "%RootDrive%\NS40" "%NS40INST%\DfltProf" /E /I /K >NUL: 2>&1
  113. :Cont4
  114. Rem #########################################################################
  115. Rem
  116. Rem �q [�}�l] �\�������|�� [�ϥΪ̳]�w�ɺ޲z��] �������ϥΪ̪�
  117. Rem Ū���v���A�o�|�����@���ϥΪ̷s�W�ϥΪ̳]�w�ɡC
  118. Rem �t�κ޲z�����M�i�H�����ϥΪ̳]�w�ɺ޲z���C
  119. Rem
  120. If Not Exist "%COMMON_PROGRAMS%\Netscape Communicator\Utilities\User Profile Manager.Lnk" Goto Cont5
  121. Cacls "%COMMON_PROGRAMS%\Netscape Communicator\Utilities\User Profile Manager.Lnk" /E /R "Authenticated Users" >Nul: 2>&1
  122. Cacls "%COMMON_PROGRAMS%\Netscape Communicator\Utilities\User Profile Manager.Lnk" /E /R "Users" >Nul: 2>&1
  123. Cacls "%COMMON_PROGRAMS%\Netscape Communicator\Utilities\User Profile Manager.Lnk" /E /R "Everyone" >Nul: 2>&1
  124. :Cont5
  125. If Not Exist "%COMMON_PROGRAMS%\Netscape Communicator Professional Edition\Utilities\User Profile Manager.Lnk" Goto Cont6
  126. Cacls "%COMMON_PROGRAMS%\Netscape Communicator Professional Edition\Utilities\User Profile Manager.Lnk" /E /R "Authenticated Users" >Nul: 2>&1
  127. Cacls "%COMMON_PROGRAMS%\Netscape Communicator Professional Edition\Utilities\User Profile Manager.Lnk" /E /R "Users" >Nul: 2>&1
  128. Cacls "%COMMON_PROGRAMS%\Netscape Communicator Professional Edition\Utilities\User Profile Manager.Lnk" /E /R "Everyone" >Nul: 2>&1
  129. :Cont6
  130. Rem #########################################################################
  131. Rem
  132. Rem ���s Com40Usr.Cmd �ӤϬM���ڪ��w�˥ؿ���
  133. Rem �N���s�W�� UsrLogn2.Cmd ���O�ɤ��C
  134. Rem
  135. ..\acsr "#PROFDIR#" "%NS40INST%\DfltProf" ..\Logon\Template\Com40Usr.Cmd ..\Logon\Com40Usr.tmp
  136. ..\acsr "#NS4VER#" "4.0x" ..\Logon\Com40Usr.tmp ..\Logon\Com40Usr.Cmd
  137. :DoUsrLogn
  138. del ..\Logon\Com40Usr.tmp >Nul: 2>&1
  139. del ..\Logon\Com40Usr.tm2 >Nul: 2>&1
  140. FindStr /I Com40Usr %SystemRoot%\System32\UsrLogn2.Cmd >Nul: 2>&1
  141. If Not ErrorLevel 1 Goto Skip1
  142. Echo Call Com40Usr.Cmd >> %SystemRoot%\System32\UsrLogn2.Cmd
  143. :Skip1
  144. Echo.
  145. Echo ���F���� Netscape Communicator ���T�ާ@�A�ثe
  146. Echo �w�n�J���ϥΪ̥������n�X�A�A���s�n�J�A�~������
  147. Echo ���ε{���C
  148. Echo.
  149. Echo Netscape Communicator 4 �h�ϥΪ����ε{���վ��B�z����
  150. Pause
  151. :done