231 lines
7.4 KiB
Batchfile
231 lines
7.4 KiB
Batchfile
|
|
|||
|
@Echo Off
|
|||
|
|
|||
|
Rem
|
|||
|
Rem <20>`<60>N: <20>b<EFBFBD>o<EFBFBD>ӫ<EFBFBD><D3AB>O<EFBFBD>ɤ<EFBFBD><C9A4><EFBFBD> CACLS <20>R<EFBFBD>O<EFBFBD>u<EFBFBD><75><EFBFBD>b
|
|||
|
Rem NTFS <20>榡<EFBFBD><E6A6A1><EFBFBD>ϺФ<CFBA><D0A4>Τ<EFBFBD><CEA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>C
|
|||
|
Rem
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
|
|||
|
Rem
|
|||
|
Rem <20>ˬd %RootDrive% <20>O<EFBFBD>_<EFBFBD>w<EFBFBD>]<5D>w<EFBFBD>A<EFBFBD>ñN<C3B1><4E><EFBFBD>]<5D>w<EFBFBD><77><EFBFBD><EFBFBD><EFBFBD>O<EFBFBD>ɡC
|
|||
|
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>N<EFBFBD>ɮױq<D7B1>ثe<D8AB>ϥΪ̽d<CCBD><64><EFBFBD>ƻs<C6BB><73><EFBFBD>Ҧ<EFBFBD><D2A6>ϥΪ̽d<CCBD><64><EFBFBD>Ҧb<D2A6><62><EFBFBD>m<EFBFBD>C
|
|||
|
Rem
|
|||
|
|
|||
|
If Not Exist "%ALLUSERSPROFILE%\%TEMPLATES%\WINWORD8.DOC" copy "%UserProfile%\%TEMPLATES%\WINWORD8.DOC" "%ALLUSERSPROFILE%\%TEMPLATES%\" /Y >Nul: 2>&1
|
|||
|
If Not Exist "%ALLUSERSPROFILE%\%TEMPLATES%\EXCEL8.XLS" copy "%UserProfile%\%TEMPLATES%\EXCEL8.XLS" "%ALLUSERSPROFILE%\%TEMPLATES%\" /Y >Nul: 2>&1
|
|||
|
If Not Exist "%ALLUSERSPROFILE%\%TEMPLATES%\BINDER.OBD" copy "%UserProfile%\%TEMPLATES%\BINDER.OBD" "%ALLUSERSPROFILE%\%TEMPLATES%\" /Y >Nul: 2>&1
|
|||
|
|
|||
|
|
|||
|
|
|||
|
Rem
|
|||
|
Rem <20>q<EFBFBD>n<EFBFBD><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>o Office 97 <20>w<EFBFBD>˦<EFBFBD><CBA6>m<EFBFBD>C
|
|||
|
Rem <20>p<EFBFBD>G<EFBFBD>䤣<EFBFBD><E4A4A3><EFBFBD>A<EFBFBD>N<EFBFBD><4E><EFBFBD>] Office <20>å<EFBFBD><C3A5>w<EFBFBD>ˡA<CBA1><41><EFBFBD><EFBFBD><EFBFBD>ܿ<EFBFBD><DCBF>~<7E>T<EFBFBD><54><EFBFBD>C
|
|||
|
Rem
|
|||
|
|
|||
|
..\ACRegL %Temp%\O97.Cmd O97INST "HKLM\Software\Microsoft\Office\8.0\Common\InstallRoot" "" ""
|
|||
|
If Not ErrorLevel 1 Goto Cont0
|
|||
|
Echo.
|
|||
|
Echo <20>L<EFBFBD>k<EFBFBD>q<EFBFBD>n<EFBFBD><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Office 97 <20><><EFBFBD>w<EFBFBD>˦<EFBFBD><CBA6>m<EFBFBD>C
|
|||
|
Echo <20>нT<D0BD>{ Office 97 <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%\O97.Cmd
|
|||
|
Del %Temp%\O97.Cmd >Nul: 2>&1
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
|
|||
|
Rem
|
|||
|
Rem <20>N Access 97 <20>t<EFBFBD>θ<EFBFBD><CEB8>Ʈw<C6AE>ܧ<DCA7>Ū<EFBFBD>C
|
|||
|
Rem <20>o<EFBFBD>˥i<CBA5>H<EFBFBD><48><EFBFBD>\<5C>h<EFBFBD>H<EFBFBD>P<EFBFBD>ɰ<EFBFBD><C9B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈw<C6AE>C
|
|||
|
Rem <20><><EFBFBD>O<EFBFBD>N<EFBFBD>L<EFBFBD>k<EFBFBD>ϥ<EFBFBD> [<5B>u<EFBFBD><75>] <20>\<5C><><EFBFBD><EFBFBD> [<5B>O<EFBFBD><4F>] <20>ӧ<EFBFBD><D3A7>s<EFBFBD>t<EFBFBD>θ<EFBFBD><CEB8>Ʈw<C6AE>C
|
|||
|
Rem <20>p<EFBFBD>G<EFBFBD>z<EFBFBD>ݭn<DDAD>s<EFBFBD>W<EFBFBD>ϥΪ̡A<CCA1>z<EFBFBD><7A><EFBFBD><EFBFBD><EFBFBD>N<EFBFBD>t<EFBFBD>θ<EFBFBD><CEB8>Ʈw<C6AE>]<5D>w<EFBFBD><77>
|
|||
|
Rem <20>i<EFBFBD>g<EFBFBD>J<EFBFBD>C
|
|||
|
Rem
|
|||
|
|
|||
|
If Not Exist %SystemRoot%\System32\System.Mdw Goto Cont1
|
|||
|
cacls %SystemRoot%\System32\System.Mdw /E /P "Authenticated Users":R >NUL: 2>&1
|
|||
|
cacls %SystemRoot%\System32\System.Mdw /E /P "Power Users":R >NUL: 2>&1
|
|||
|
cacls %SystemRoot%\System32\System.Mdw /E /P Administrators:R >NUL: 2>&1
|
|||
|
|
|||
|
:Cont1
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
|
|||
|
Rem
|
|||
|
Rem <20><><EFBFBD>\<5C><><EFBFBD><EFBFBD><EFBFBD>HŪ<48><C5AA><EFBFBD>Q Office 97 <20><><EFBFBD>s<EFBFBD>L<EFBFBD><4C><EFBFBD>t<EFBFBD><74> DLL<4C>C
|
|||
|
Rem
|
|||
|
|
|||
|
REM If Exist %SystemRoot%\System32\OleAut32.Dll cacls %SystemRoot%\System32\OleAut32.Dll /E /T /G "Authenticated Users":R >NUL: 2>&1
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
|
|||
|
Rem
|
|||
|
Rem <20><><EFBFBD>\ TS Users <20>ܧ<EFBFBD> outlook <20><> frmcache.dat <20>ɮ<EFBFBD>
|
|||
|
Rem
|
|||
|
|
|||
|
If Exist %SystemRoot%\Forms\frmcache.dat cacls %SystemRoot%\forms\frmcache.dat /E /G "Terminal Server User":C >NUL: 2>&1
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
|
|||
|
Rem
|
|||
|
Rem <20>N Powerpoint <20><><EFBFBD>F<EFBFBD>ܧ<DCA7>Ū<EFBFBD>A<EFBFBD><41><EFBFBD>\<5C>h<EFBFBD>H<EFBFBD>i<EFBFBD>H
|
|||
|
Rem <20>P<EFBFBD>ɩI<C9A9>s<EFBFBD><73><EFBFBD>F<EFBFBD>C
|
|||
|
Rem
|
|||
|
|
|||
|
If Exist "%O97INST%\Templates\²<><C2B2>\<5C><><EFBFBD>e<EFBFBD>j<EFBFBD><6A><EFBFBD><EFBFBD><EFBFBD>F.pwz" Attrib +R "%O97INST%\Templates\²<><C2B2>\<5C><><EFBFBD>e<EFBFBD>j<EFBFBD><6A><EFBFBD><EFBFBD><EFBFBD>F.pwz" >Nul: 2>&1
|
|||
|
|
|||
|
If Exist "%O97INST%\Office\Ppt2html.ppa" Attrib +R "%O97INST%\Office\Ppt2html.ppa" >Nul: 2>&1
|
|||
|
If Exist "%O97INST%\Office\bshppt97.ppa" Attrib +R "%O97INST%\Office\bshppt97.ppa" >Nul: 2>&1
|
|||
|
If Exist "%O97INST%\Office\geniwiz.ppa" Attrib +R "%O97INST%\Office\geniwiz.ppa" >Nul: 2>&1
|
|||
|
If Exist "%O97INST%\Office\ppttools.ppa" Attrib +R "%O97INST%\Office\ppttools.ppa" >Nul: 2>&1
|
|||
|
If Exist "%O97INST%\Office\graphdrs.ppa" Attrib +R "%O97INST%\Office\graphdrs.ppa" >Nul: 2>&1
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
|
|||
|
Rem
|
|||
|
Rem <20>p<EFBFBD>G<EFBFBD>z<EFBFBD>n<EFBFBD><6E><EFBFBD>D<EFBFBD>t<EFBFBD>κz<DEB2><7A><EFBFBD><EFBFBD><EFBFBD>ϥΪ̦b Excel <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Access <20><><EFBFBD>F<EFBFBD><46>
|
|||
|
Rem Access Add-Ins<6E>A<EFBFBD>z<EFBFBD><7A><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>H<EFBFBD>U 3 <20><><EFBFBD>{<7B><><EFBFBD>X<EFBFBD><58> "Rem"<22>A
|
|||
|
Rem <20><><EFBFBD>ϥΪ<CFA5><CEAA>ܧ<EFBFBD><DCA7><EFBFBD><EFBFBD>F<EFBFBD>ɮת<C9AE><D7AA>s<EFBFBD><73><EFBFBD>覡<EFBFBD>C
|
|||
|
Rem
|
|||
|
Rem
|
|||
|
|
|||
|
Rem If Exist "%O97INST%\Office\WZLIB80.MDE" cacls "%O97INST%\Office\WZLIB80.MDE" /E /P "Authenticated Users":C >NUL: 2>&1
|
|||
|
Rem If Exist "%O97INST%\Office\WZMAIN80.MDE" cacls "%O97INST%\Office\WZMAIN80.MDE" /E /P "Authenticated Users":C >NUL: 2>&1
|
|||
|
Rem If Exist "%O97INST%\Office\WZTOOL80.MDE" cacls "%O97INST%\Office\WZTOOL80.MDE" /E /P "Authenticated Users":C >NUL: 2>&1
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
|
|||
|
Rem
|
|||
|
Rem <20>إ<EFBFBD> MsForms.Twd <20><> RefEdit.Twd <20>ɮסA<D7A1><41><EFBFBD>̬O
|
|||
|
Rem Powerpoint <20><> Excel Add-ins ([<5B>ɮ<EFBFBD>] [<5B>x<EFBFBD>s<EFBFBD><73> HTML] <20><><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɮסC
|
|||
|
Rem <20><><EFBFBD><EFBFBD><EFBFBD>o<EFBFBD><6F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ε{<7B><><EFBFBD>ɡA<C9A1><41><EFBFBD>̱N<CCB1>|<7C>ξA<CEBE><41><EFBFBD><EFBFBD><EFBFBD>ɮרӨ<D7A8><D3A8>N<EFBFBD>t<EFBFBD><74><EFBFBD><EFBFBD><EFBFBD>n<EFBFBD><6E><EFBFBD>ƪ<EFBFBD><C6AA>ɮסC
|
|||
|
Rem
|
|||
|
|
|||
|
If Exist %systemroot%\system32\MsForms.Twd Goto Cont2
|
|||
|
Copy Nul: %systemroot%\system32\MsForms.Twd >Nul: 2>&1
|
|||
|
Cacls %systemroot%\system32\MsForms.Twd /E /P "Authenticated Users":F >Nul: 2>&1
|
|||
|
:Cont2
|
|||
|
|
|||
|
If Exist %systemroot%\system32\RefEdit.Twd Goto Cont3
|
|||
|
Copy Nul: %systemroot%\system32\RefEdit.Twd >Nul: 2>&1
|
|||
|
Cacls %systemroot%\system32\RefEdit.Twd /E /P "Authenticated Users":F >Nul: 2>&1
|
|||
|
:Cont3
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
|
|||
|
Rem
|
|||
|
Rem <20>b SystemRoot <20>U<EFBFBD>إ<EFBFBD> msremote.sfs <20>ؿ<EFBFBD><D8BF>C<EFBFBD>o<EFBFBD>˷|<7C><><EFBFBD>\<5C>ϥΪ<CFA5>
|
|||
|
Rem <20>ϥ<EFBFBD> [<5B><><EFBFBD><EFBFBD><EFBFBD>x] [<5B>l<EFBFBD><6C><EFBFBD>ζǯu] <20>ϥܨӫإ߳]<5D>w<EFBFBD>ɡC
|
|||
|
Rem
|
|||
|
|
|||
|
md %systemroot%\msremote.sfs > Nul: 2>&1
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
|
|||
|
Rem
|
|||
|
Rem <20>q [<5B>Ұ<EFBFBD>] <20>\<5C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> [<5B>ֳt<D6B3>M<EFBFBD><4D>]<5D>C
|
|||
|
Rem [<5B>ֳt<D6B3>M<EFBFBD><4D>] <20>|<7C>ϥΤj<CEA4>q<EFBFBD>귽<EFBFBD>í<EFBFBD><C3AD>C<EFBFBD>t<EFBFBD>ήį<CEAE><C4AF>C
|
|||
|
Rem
|
|||
|
|
|||
|
If Exist "%COMMON_STARTUP%\Microsoft Find Fast.lnk" Del "%COMMON_STARTUP%\Microsoft Find Fast.lnk" >Nul: 2>&1
|
|||
|
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
Rem
|
|||
|
Rem <20>q<EFBFBD>Ҧ<EFBFBD><D2A6>ϥΪ̪<CEAA> [<5B>Ұ<EFBFBD>] <20>\<5C><><EFBFBD><EFBFBD><EFBFBD>W<EFBFBD><57><EFBFBD><EFBFBD> [Microsoft Office <20>ֱ<EFBFBD><D6B1>C.lnk] <20>ɮסC
|
|||
|
Rem
|
|||
|
|
|||
|
If Exist "%COMMON_STARTUP%\Microsoft Office <20>ֱ<EFBFBD><D6B1>C.lnk" Del "%COMMON_STARTUP%\Microsoft Office <20>ֱ<EFBFBD><D6B1>C.lnk" >Nul: 2>&1
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
Rem
|
|||
|
Rem <20>b SystemRoot <20>U<EFBFBD>إ<EFBFBD> msfslog.txt <20>ɮסA<D7A1><41><EFBFBD><EFBFBD> Terminal Server
|
|||
|
Rem <20><><EFBFBD>ϥΪ̦<CEAA><CCA6>ɮת<C9AE><D7AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>s<EFBFBD><73><EFBFBD>v<EFBFBD>C
|
|||
|
Rem
|
|||
|
|
|||
|
If Exist %systemroot%\MSFSLOG.TXT Goto MsfsACLS
|
|||
|
Copy Nul: %systemroot%\MSFSLOG.TXT >Nul: 2>&1
|
|||
|
:MsfsACLS
|
|||
|
Cacls %systemroot%\MSFSLOG.TXT /E /P "Terminal Server User":F >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>V<EFBFBD>ϥΪ̩ҫ<CCA9><D2AB>w<EFBFBD><77>
|
|||
|
Rem <20>ؿ<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
|
|||
|
Set __SharedTools=Shared Tools
|
|||
|
If Not "%PROCESSOR_ARCHITECTURE%"=="ALPHA" goto acsrCont1
|
|||
|
If Not Exist "%ProgramFiles(x86)%" goto acsrCont1
|
|||
|
Set __SharedTools=Shared Tools (x86)
|
|||
|
:acsrCont1
|
|||
|
..\acsr "#ROOTDRIVE#" "%RootDrive%" Template\Office97.Key Office97.Tmp
|
|||
|
..\acsr "#__SharedTools#" "%__SharedTools%" Office97.Tmp Office97.Tmp2
|
|||
|
..\acsr "#INSTDIR#" "%O97INST%" Office97.Tmp2 Office97.Tmp3
|
|||
|
..\acsr "#MY_DOCUMENTS#" "%MY_DOCUMENTS%" Office97.Tmp3 Office97.Key
|
|||
|
Del Office97.Tmp >Nul: 2>&1
|
|||
|
Del Office97.Tmp2 >Nul: 2>&1
|
|||
|
Del Office97.Tmp3 >Nul: 2>&1
|
|||
|
|
|||
|
regini Office97.key > Nul:
|
|||
|
|
|||
|
Rem <20>p<EFBFBD>G<EFBFBD>쥻<EFBFBD>O<EFBFBD><4F><EFBFBD><EFBFBD><EFBFBD>Ҧ<EFBFBD><D2A6>A<EFBFBD>N<EFBFBD>ܦ^<5E><><EFBFBD><EFBFBD><EFBFBD>Ҧ<EFBFBD><D2A6>C
|
|||
|
If "%__OrigMode%" == "Exec" Change User /Execute > Nul:
|
|||
|
Set __OrigMode=
|
|||
|
|
|||
|
Rem #########################################################################
|
|||
|
|
|||
|
Rem
|
|||
|
Rem <20><><EFBFBD>s Ofc97Usr.Cmd <20>ӤϬM<CFAC><4D><EFBFBD>ڪ<EFBFBD><DAAA>w<EFBFBD>˥ؿ<CBA5><D8BF>A
|
|||
|
Rem <20>ñN<C3B1><4E><EFBFBD>[<5B>J UsrLogn2.Cmd <20><><EFBFBD>O<EFBFBD>ɡC
|
|||
|
Rem
|
|||
|
|
|||
|
..\acsr "#INSTDIR#" "%O97INST%" ..\Logon\Template\Ofc97Usr.Cmd ..\Logon\Ofc97Usr.Cmd
|
|||
|
|
|||
|
FindStr /I Ofc97Usr %SystemRoot%\System32\UsrLogn2.Cmd >Nul: 2>&1
|
|||
|
If Not ErrorLevel 1 Goto Skip1
|
|||
|
Echo Call Ofc97Usr.Cmd >> %SystemRoot%\System32\UsrLogn2.Cmd
|
|||
|
:Skip1
|
|||
|
|
|||
|
Echo.
|
|||
|
Echo <20><><EFBFBD>F<EFBFBD><46><EFBFBD><EFBFBD> Office 97 <20><><EFBFBD>T<EFBFBD>ާ@<40>A<EFBFBD>ثe<D8AB>w<EFBFBD>n<EFBFBD>J
|
|||
|
Echo <20><><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 Office 97 <20><><EFBFBD>ε{<7B><><EFBFBD>C
|
|||
|
Echo.
|
|||
|
Echo Microsoft Office 97 <20>h<EFBFBD>ϥΪ<CFA5><CEAA><EFBFBD><EFBFBD>ε{<7B><><EFBFBD>վ<EFBFBD><D5BE>B<EFBFBD>z<EFBFBD><7A><EFBFBD><EFBFBD>
|
|||
|
Pause
|
|||
|
|
|||
|
:done
|