291 lines
9 KiB
Batchfile
291 lines
9 KiB
Batchfile
|
@Echo Off
|
|||
|
|
|||
|
Rem
|
|||
|
Rem <20>`<60>N: CACLS <20><><EFBFBD>O<EFBFBD>u<EFBFBD><75><EFBFBD>b NTFS <20>榡<EFBFBD><E6A6A1><EFBFBD>ϺФ<CFBA><D0A4>Τ<EFBFBD><CEA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>C
|
|||
|
Rem
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
Rem
|
|||
|
Rem
|
|||
|
|
|||
|
Call "%SystemRoot%\Application Compatibility Scripts\ChkRoot.Cmd"
|
|||
|
If "%_CHKROOT%" == "FAIL" Goto Done
|
|||
|
Call "%SystemRoot%\Application Compatibility Scripts\SetPaths.Cmd"
|
|||
|
If "%_SETPATHS%" == "FAIL" Goto Done
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
|
|||
|
Rem
|
|||
|
Rem <20>q<EFBFBD>n<EFBFBD><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>o Visual Studio 6.0 <20>w<EFBFBD>˦<EFBFBD><CBA6>m<EFBFBD>C
|
|||
|
Rem <20>p<EFBFBD>G<EFBFBD>䤣<EFBFBD><E4A4A3><EFBFBD>A<EFBFBD>N<EFBFBD><4E><EFBFBD>] Visual Studio 6.0 <20>å<EFBFBD><C3A5>w<EFBFBD>˨<EFBFBD><CBA8><EFBFBD><EFBFBD>ܿ<EFBFBD><DCBF>~<7E>T<EFBFBD><54><EFBFBD>C
|
|||
|
Rem
|
|||
|
|
|||
|
..\ACRegL %Temp%\0VC98.Cmd 0VC98 "HKLM\Software\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual C++" "ProductDir" ""
|
|||
|
If Not ErrorLevel 1 Goto Cont0
|
|||
|
|
|||
|
Echo.
|
|||
|
Echo <20>L<EFBFBD>k<EFBFBD>q<EFBFBD>n<EFBFBD><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Visual Studio 6.0 <20><><EFBFBD>w<EFBFBD>˦<EFBFBD><CBA6>m<EFBFBD>C
|
|||
|
Echo <20>нT<D0BD>{ Visual Studio 6.0 <20>O<EFBFBD>_<EFBFBD>w<EFBFBD>w<EFBFBD>ˡA<CBA1>M<EFBFBD>᭫<EFBFBD>s
|
|||
|
Echo <20><><EFBFBD><EFBFBD><EFBFBD>o<EFBFBD>ӫ<EFBFBD><D3AB>O<EFBFBD>ɡC
|
|||
|
Echo.
|
|||
|
Pause
|
|||
|
Goto Done
|
|||
|
:Cont0
|
|||
|
Call %Temp%\0VC98.Cmd
|
|||
|
Del %Temp%\0VC98.Cmd >Nul: 2>&1
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
Rem
|
|||
|
Rem <20>ܧ<EFBFBD><DCA7>n<EFBFBD><6E><EFBFBD><EFBFBD><EFBFBD>X<EFBFBD>A<EFBFBD>N<EFBFBD><4E><EFBFBD>|<7C><><EFBFBD><EFBFBD><EFBFBD>ϥΪ̫<CEAA><CCAB>w<EFBFBD>ؿ<EFBFBD><D8BF>C
|
|||
|
Rem
|
|||
|
Rem <20>p<EFBFBD>G<EFBFBD>ثe<D8AB><65><EFBFBD>O<EFBFBD>w<EFBFBD>˼Ҧ<CBBC><D2A6>A<EFBFBD>N<EFBFBD>ܧw<F3A6A8A6>˼Ҧ<CBBC><D2A6>C
|
|||
|
Set __OrigMode=Install
|
|||
|
ChgUsr /query > Nul:
|
|||
|
if Not ErrorLevel 101 Goto Begin
|
|||
|
Set __OrigMode=Exec
|
|||
|
Change User /Install > Nul:
|
|||
|
:Begin
|
|||
|
..\acsr "#ROOTDRIVE#" "%RootDrive%" Template\msvs6.Key %temp%\msvs6.tmp
|
|||
|
..\acsr "#MY_DOCUMENTS#" "%MY_DOCUMENTS%" %temp%\msvs6.tmp %temp%\msvs6.tmp2
|
|||
|
..\acsr "#APP_DATA#" "%APP_DATA%" %temp%\msvs6.tmp2 msvs6.key
|
|||
|
Del %temp%\msvs6.tmp >Nul: 2>&1
|
|||
|
Del %temp%\msvs6.tmp2 >Nul: 2>&1
|
|||
|
regini msvs6.key > Nul:
|
|||
|
|
|||
|
Rem <20>p<EFBFBD>G<EFBFBD><47><EFBFBD>ӬO<D3AC><4F><EFBFBD><EFBFBD><EFBFBD>Ҧ<EFBFBD><D2A6>A<EFBFBD>N<EFBFBD>N<EFBFBD>ܦ^<5E><><EFBFBD><EFBFBD><EFBFBD>Ҧ<EFBFBD><D2A6>C
|
|||
|
If "%__OrigMode%" == "Exec" Change User /Execute > Nul:
|
|||
|
Set __OrigMode=
|
|||
|
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
Rem Create the user logon file for Visual Studio app
|
|||
|
|
|||
|
Echo Rem >..\logon\VS6USR.Cmd
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
Rem <20><><EFBFBD>C<EFBFBD>ӨϥΪ̫إ<CCAB> Visual Studio <20>M<EFBFBD>ץؿ<D7A5><D8BF>C
|
|||
|
|
|||
|
Echo Rem >>..\logon\VS6USR.Cmd
|
|||
|
Echo Rem Create per user Visual Studio projects directory>>..\logon\VS6USR.Cmd
|
|||
|
Echo call TsMkUDir "%RootDrive%\%MY_DOCUMENTS%\Visual Studio Projects">>..\logon\VS6USR.Cmd
|
|||
|
Echo Rem >>..\logon\VS6USR.Cmd
|
|||
|
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
|
|||
|
Rem
|
|||
|
Rem <20>q<EFBFBD>n<EFBFBD><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>o Visual Studio 6.0 Entreprise Edition Tools <20>w<EFBFBD>˦<EFBFBD><CBA6>m<EFBFBD>C
|
|||
|
Rem <20>p<EFBFBD>G<EFBFBD>䤣<EFBFBD><E4A4A3><EFBFBD>A<EFBFBD>N<EFBFBD><4E><EFBFBD>] Visual Studio 6.0 <20>å<EFBFBD><C3A5>w<EFBFBD>˨<EFBFBD><CBA8><EFBFBD><EFBFBD>ܿ<EFBFBD><DCBF>~<7E>T<EFBFBD><54><EFBFBD>C
|
|||
|
Rem <20>p<EFBFBD>G<EFBFBD><47><EFBFBD><EFBFBD> US <20><><EFBFBD><EFBFBD><EFBFBD>A<EFBFBD><41><EFBFBD>|<7C>]<5D>t <VStudioPath>\Common\Tools
|
|||
|
Rem
|
|||
|
|
|||
|
..\ACRegL %Temp%\VSEET.Cmd VSEET "HKLM\Software\Microsoft\VisualStudio\6.0\Setup\Microsoft VSEE Client" "ProductDir" ""
|
|||
|
If Not ErrorLevel 1 Goto VSEET0
|
|||
|
|
|||
|
Goto VSEETDone
|
|||
|
:VSEET0
|
|||
|
Call %Temp%\VSEET.Cmd
|
|||
|
Del %Temp%\VSEET.Cmd >Nul: 2>&1
|
|||
|
|
|||
|
If Not Exist "%VSEET%\APE\AEMANAGR.INI" Goto VSEETDone
|
|||
|
..\acsr "=AE.LOG" "=%RootDrive%\AE.LOG" "%VSEET%\APE\AEMANAGR.INI" "%VSEET%\APE\AEMANAGR.TMP"
|
|||
|
If Exist "%VSEET%\APE\AEMANAGRINI.SAV" Del /F /Q "%VSEET%\APE\AEMANAGRINI.SAV"
|
|||
|
ren "%VSEET%\APE\AEMANAGR.INI" "AEMANAGRINI.SAV"
|
|||
|
ren "%VSEET%\APE\AEMANAGR.TMP" "AEMANAGR.INI"
|
|||
|
|
|||
|
Echo Rem Copy APE ini file to the user windows directory >>..\logon\VS6USR.Cmd
|
|||
|
Echo Rem >>..\logon\VS6USR.Cmd
|
|||
|
Echo If Exist "%RootDrive%\Windows\AEMANAGR.INI" Goto UVSEET0 >>..\logon\VS6USR.Cmd
|
|||
|
Echo If Exist "%VSEET%\APE\AEMANAGR.INI" Copy "%VSEET%\APE\AEMANAGR.INI" "%RootDrive%\Windows\AEMANAGR.INI" >Nul: 2>&1 >>..\logon\VS6USR.Cmd
|
|||
|
Echo Rem >>..\logon\VS6USR.Cmd
|
|||
|
Echo :UVSEET0>>..\logon\VS6USR.Cmd
|
|||
|
|
|||
|
Echo Rem Copy Visual Modeler ini file to the user windows directory >>..\logon\VS6USR.Cmd
|
|||
|
Echo Rem >>..\logon\VS6USR.Cmd
|
|||
|
Echo If Exist "%RootDrive%\Windows\ROSE.INI" Goto UVSEET1 >>..\logon\VS6USR.Cmd
|
|||
|
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
|
|||
|
Echo Rem >>..\logon\VS6USR.Cmd
|
|||
|
Echo :UVSEET1>>..\logon\VS6USR.Cmd
|
|||
|
|
|||
|
:VSEETDone
|
|||
|
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
|
|||
|
Rem
|
|||
|
Rem <20>N VS6USR.Cmd <20>[<5B>J UsrLogn2.Cmd <20><><EFBFBD>O<EFBFBD>ɡC
|
|||
|
Rem
|
|||
|
|
|||
|
FindStr /I VS6USR %SystemRoot%\System32\UsrLogn2.Cmd >Nul: 2>&1
|
|||
|
If Not ErrorLevel 1 Goto Skip1
|
|||
|
Echo Call VS6USR.Cmd >> %SystemRoot%\System32\UsrLogn2.Cmd
|
|||
|
:Skip1
|
|||
|
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
Rem <20><><EFBFBD>o Visual foxPro <20><><EFBFBD>~<7E>w<EFBFBD>˥ؿ<CBA5>
|
|||
|
|
|||
|
..\ACRegL %Temp%\VFP98TMP.Cmd VFP98DIR "HKLM\Software\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual FoxPro" "ProductDir" ""
|
|||
|
|
|||
|
Rem <20>p<EFBFBD>G Visual FoxPro <20>å<EFBFBD><C3A5>w<EFBFBD>ˡA<CBA1>N<EFBFBD><4E><EFBFBD>L<EFBFBD>ΨӲM<D3B2><4D><EFBFBD><EFBFBD><EFBFBD>{<7B><><EFBFBD>X<EFBFBD>C
|
|||
|
If ErrorLevel 1 goto Skip2
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
|
|||
|
Rem
|
|||
|
Rem <20>q<EFBFBD>n<EFBFBD><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>o<EFBFBD>ۭq<DBAD>ؿ<EFBFBD><D8BF><EFBFBD><EFBFBD>X<EFBFBD>C
|
|||
|
Rem
|
|||
|
|
|||
|
Set __SharedTools=Shared Tools
|
|||
|
If Not "%PROCESSOR_ARCHITECTURE%"=="ALPHA" goto VFP98L2
|
|||
|
If Not Exist "%ProgramFiles(x86)%" goto VFP98L2
|
|||
|
Set __SharedTools=Shared Tools (x86)
|
|||
|
:VFP98L2
|
|||
|
|
|||
|
|
|||
|
..\ACRegL %Temp%\VFP98TMP.Cmd VFP98DIC "HKLM\Software\Microsoft\%__SharedTools%\Proofing Tools\Custom Dictionaries" "1" ""
|
|||
|
If Not ErrorLevel 1 Goto VFP98L3
|
|||
|
|
|||
|
Echo.
|
|||
|
Rem <20>L<EFBFBD>k<EFBFBD>q<EFBFBD>n<EFBFBD><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȴN<C8B4>إߥ<D8A5><DFA5>C
|
|||
|
Echo.
|
|||
|
|
|||
|
Rem <20>إ<EFBFBD> VFP98TMP.key <20>ɮסC
|
|||
|
|
|||
|
Echo HKEY_LOCAL_MACHINE\Software\Microsoft\%__SharedTools%\Proofing Tools\Custom Dictionaries> %Temp%\VFP98TMP.key
|
|||
|
Echo 1 = REG_SZ "%RootDrive%\%MY_DOCUMENTS%\Custom.Dic">> %Temp%\VFP98TMP.key
|
|||
|
|
|||
|
Rem <20>إ߭<D8A5>
|
|||
|
regini %Temp%\VFP98TMP.key > Nul:
|
|||
|
|
|||
|
Del %Temp%\VFP98TMP.key >Nul: 2>&1
|
|||
|
|
|||
|
Echo set VFP98DIC=%RootDrive%\%MY_DOCUMENTS%\Custom.Dic>%Temp%\VFP98TMP.Cmd
|
|||
|
:VFP98L3
|
|||
|
|
|||
|
Call %Temp%\VFP98TMP.Cmd
|
|||
|
Del %Temp%\VFP98TMP.Cmd >Nul: 2>&1
|
|||
|
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
Rem <20>إ<EFBFBD> Visual FoxPro app <20><><EFBFBD>ϥΪ̵n<CCB5>J<EFBFBD>ɮ<EFBFBD>
|
|||
|
|
|||
|
Echo Rem >..\logon\VFP98USR.Cmd
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
Rem Create per user Visual FoxPro directories
|
|||
|
|
|||
|
Echo Rem >>..\logon\VFP98USR.Cmd
|
|||
|
Echo Rem Create a per user Visual FoxPro directory (VFP98)>>..\logon\VFP98USR.Cmd
|
|||
|
Echo call TsMkUDir %RootDrive%\VFP98>>..\logon\VFP98USR.Cmd
|
|||
|
Echo Rem >>..\logon\VFP98USR.Cmd
|
|||
|
|
|||
|
Echo Rem Create a per user Visual FoxPro distrib directory >>..\logon\VFP98USR.Cmd
|
|||
|
Echo call TsMkUDir %RootDrive%\VFP98\DISTRIB>>..\logon\VFP98USR.Cmd
|
|||
|
Echo Rem >>..\logon\VFP98USR.Cmd
|
|||
|
|
|||
|
Echo Rem #########################################################################>>..\logon\VFP98USR.Cmd
|
|||
|
Echo Rem Create the custom dictionary if it doesn't exist.>>..\logon\VFP98USR.Cmd
|
|||
|
Echo Rem >>..\logon\VFP98USR.Cmd
|
|||
|
|
|||
|
Echo If Exist "%VFP98DIC%" Goto VFP98L2 >>..\logon\VFP98USR.Cmd
|
|||
|
Echo Copy Nul: "%VFP98DIC%" >Nul: 2>&1 >>..\logon\VFP98USR.Cmd
|
|||
|
|
|||
|
Echo :VFP98L2 >>..\logon\VFP98USR.Cmd
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
Rem Get the Visual foxPro product install directory
|
|||
|
|
|||
|
..\ACRegL %Temp%\VFP98TMP.Cmd VFP98DIR "HKLM\Software\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual FoxPro" "ProductDir" ""
|
|||
|
If Not ErrorLevel 1 Goto VFP98L4
|
|||
|
|
|||
|
Del ..\logon\VFP98USR.Cmd >Nul: 2>&1
|
|||
|
|
|||
|
Echo.
|
|||
|
Echo <20>L<EFBFBD>k<EFBFBD>q<EFBFBD>n<EFBFBD><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Visual Studio 6.0 <20><><EFBFBD>w<EFBFBD>˦<EFBFBD><CBA6>m<EFBFBD>C
|
|||
|
Echo <20>нT<D0BD>{ Visual Studio 6.0 <20>O<EFBFBD>_<EFBFBD>w<EFBFBD>w<EFBFBD>ˡA<CBA1>M<EFBFBD>᭫<EFBFBD>s
|
|||
|
Echo <20><><EFBFBD><EFBFBD><EFBFBD>o<EFBFBD>ӫ<EFBFBD><D3AB>O<EFBFBD>ɡC
|
|||
|
Echo.
|
|||
|
Pause
|
|||
|
Goto Skip2
|
|||
|
|
|||
|
:VFP98L4
|
|||
|
Call "%Temp%\VFP98TMP.Cmd"
|
|||
|
Del "%Temp%\VFP98TMP.Cmd"
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
Rem <20>b WZSETUP.INI <20>ɮפ<C9AE><D7A4>]<5D>w<EFBFBD>U<EFBFBD>C<EFBFBD><43><EFBFBD>X<EFBFBD>C
|
|||
|
Rem
|
|||
|
If Exist "%VFP98DIR%\WZSETUP.INI" Goto VFP98L5
|
|||
|
Echo [Preferences] >"%VFP98DIR%\WZSETUP.INI"
|
|||
|
Echo DistributionDirectory=%RootDrive%\VFP98\DISTRIB >>"%VFP98DIR%\WZSETUP.INI"
|
|||
|
|
|||
|
:VFP98L5
|
|||
|
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
Rem
|
|||
|
Rem Change Registry Keys to make paths point to user specific
|
|||
|
Rem directories.
|
|||
|
Rem
|
|||
|
|
|||
|
|
|||
|
Rem First Create VFP98TMP.key file
|
|||
|
|
|||
|
Echo HKEY_CURRENT_USER\Software\Microsoft\VisualFoxPro\6.0\Options> %Temp%\VFP98TMP.key
|
|||
|
Echo DEFAULT = REG_SZ "%RootDrive%\VFP98">> %Temp%\VFP98TMP.key
|
|||
|
Echo SetDefault = REG_SZ "1">> %Temp%\VFP98TMP.key
|
|||
|
Echo ResourceTo = REG_SZ "%RootDrive%\VFP98\FOXUSER.DBF">> %Temp%\VFP98TMP.key
|
|||
|
Echo ResourceOn = REG_SZ "1">> %Temp%\VFP98TMP.key
|
|||
|
|
|||
|
Rem <20>p<EFBFBD>G<EFBFBD>ثe<D8AB><65><EFBFBD>O<EFBFBD>w<EFBFBD>˼Ҧ<CBBC><D2A6>A<EFBFBD>N<EFBFBD>ܧw<F3A6A8A6>˼Ҧ<CBBC><D2A6>C
|
|||
|
Set __OrigMode=Install
|
|||
|
ChgUsr /query > Nul:
|
|||
|
if Not ErrorLevel 101 Goto VFP98L6
|
|||
|
Set __OrigMode=Exec
|
|||
|
Change User /Install > Nul:
|
|||
|
:VFP98L6
|
|||
|
|
|||
|
regini %Temp%\VFP98TMP.key > Nul:
|
|||
|
|
|||
|
Rem <20>p<EFBFBD>G<EFBFBD><47><EFBFBD>ӬO<D3AC><4F><EFBFBD><EFBFBD><EFBFBD>Ҧ<EFBFBD><D2A6>A<EFBFBD>N<EFBFBD>N<EFBFBD>ܦ^<5E><><EFBFBD><EFBFBD><EFBFBD>Ҧ<EFBFBD><D2A6>C
|
|||
|
If "%__OrigMode%" == "Exec" Change User /Execute > Nul:
|
|||
|
Set __OrigMode=
|
|||
|
|
|||
|
Del %Temp%\VFP98TMP.key >Nul: 2>&1
|
|||
|
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
|
|||
|
Rem
|
|||
|
Rem <20>N VFP98USR.Cmd <20>[<5B>J UsrLogn2.Cmd <20><><EFBFBD>O<EFBFBD><4F>
|
|||
|
Rem
|
|||
|
|
|||
|
FindStr /I VFP98USR %SystemRoot%\System32\UsrLogn2.Cmd >Nul: 2>&1
|
|||
|
If Not ErrorLevel 1 Goto Skip2
|
|||
|
Echo Call VFP98USR.Cmd >> %SystemRoot%\System32\UsrLogn2.Cmd
|
|||
|
:Skip2
|
|||
|
|
|||
|
If Exist "%Temp%\VFP98TMP.Cmd" Del "%Temp%\VFP98TMP.Cmd"
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
|
|||
|
Rem
|
|||
|
Rem <20>»P TS <20>ϥΪ<CFA5><CEAA>v<EFBFBD><76><EFBFBD><EFBFBD><EFBFBD>ܧ<EFBFBD> repostry <20>ؿ<EFBFBD><D8BF>A
|
|||
|
Rem <20>H<EFBFBD>K<EFBFBD>ϥ<EFBFBD> Visual Component Manager<65>C
|
|||
|
Rem
|
|||
|
|
|||
|
If Exist "%SystemRoot%\msapps\repostry" cacls "%SystemRoot%\msapps\repostry" /E /G "Terminal Server User":C >NUL: 2>&1
|
|||
|
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
Echo.
|
|||
|
Echo <20><><EFBFBD>F<EFBFBD><46><EFBFBD><EFBFBD> Visual Studio 6.0 <20><><EFBFBD>T<EFBFBD>ާ@<40>A<EFBFBD>ثe<D8AB>w
|
|||
|
Echo <20>n<EFBFBD>J<EFBFBD><4A><EFBFBD>ϥΪ̥<CEAA><CCA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>n<EFBFBD>X<EFBFBD>A<EFBFBD>A<EFBFBD><41><EFBFBD>s<EFBFBD>n<EFBFBD>J<EFBFBD>A<EFBFBD>~<7E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
Echo Visual Studio 6.0 <20><><EFBFBD>ε{<7B><><EFBFBD>C
|
|||
|
Echo.
|
|||
|
Echo Microsoft Visual Studio 6.0 <20>h<EFBFBD>ϥΪ<CFA5><CEAA><EFBFBD><EFBFBD>ε{<7B><><EFBFBD>վ<EFBFBD><D5BE>B<EFBFBD>z<EFBFBD><7A><EFBFBD><EFBFBD>
|
|||
|
Pause
|
|||
|
|
|||
|
:done
|