windows-nt/Source/XPSP1/NT/termsrv/admtools/appcmpt/chs/office97.cmd

234 lines
7.5 KiB
Batchfile
Raw Permalink Normal View History

2020-09-26 03:20:57 -05:00
@Echo Off
Rem
Rem ע<><D7A2>: <20><><EFBFBD><EFBFBD><EFBFBD>ű<EFBFBD><C5B1>е<EFBFBD> CACLS <20><><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB> NTFS
Rem <20><>ʽ<EFBFBD><CABD><EFBFBD>Ĵ<EFBFBD><C4B4>̷<EFBFBD><CCB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7>
Rem
Rem #########################################################################
Rem #########################################################################
Rem
Rem <20><><EFBFBD><EFBFBD>֤ %RootDrive% <20>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><C3A3><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD>ű<EFBFBD><C5B1><EFBFBD><EFBFBD>øñ<C3B8><C3B1><EFBFBD><EFBFBD><EFBFBD>
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><><EFBFBD>ļ<EFBFBD><C4BC>ӵ<EFBFBD>ǰ<EFBFBD>û<EFBFBD>ģ<EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>ģ<EFBFBD><C4A3>λ<EFBFBD><CEBB>
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><>ע<EFBFBD><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ Office 97 <20>İ<EFBFBD>װλ<D7B0>á<EFBFBD><C3A1><EFBFBD><EFBFBD><EFBFBD>
Rem <20>Ҳ<EFBFBD><D2B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ٶ<EFBFBD> Office û<>а<EFBFBD>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>
Rem
..\ACRegL %Temp%\O97.Cmd O97INST "HKLM\Software\Microsoft\Office\8.0\Common\InstallRoot" "" ""
If Not ErrorLevel 1 Goto Cont0
Echo.
Echo <20>޷<EFBFBD><DEB7><EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Office 97 <20><>װλ<D7B0>á<EFBFBD>
Echo <20><><EFBFBD><EFBFBD>֤ Office 97 <20>Ƿ<EFBFBD><C7B7>Ѱ<EFBFBD>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD>ٴ<EFBFBD><D9B4><EFBFBD><EFBFBD><EFBFBD>
Echo <20><><EFBFBD><EFBFBD><EFBFBD>ű<EFBFBD><C5B1><EFBFBD>
Echo.
Pause
Goto Done
:Cont0
Call %Temp%\O97.Cmd
Del %Temp%\O97.Cmd >Nul: 2>&1
Rem #########################################################################
Rem
Rem <20><> Access 97 ϵͳ<CFB5><CDB3><EFBFBD>ݿ<EFBFBD><DDBF>ij<EFBFBD>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Rem <20><><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>ͬʱ<CDAC><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ⡣<DDBF><E2A1A3><EFBFBD>ǣ<EFBFBD><C7A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Rem <20><><EFBFBD><EFBFBD><EFBFBD>ø<EFBFBD><C3B8><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD>ݿ<EFBFBD><DDBF>Ĺ<EFBFBD><C4B9>ܡ<EFBFBD><DCA1><EFBFBD><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD>ݿ<EFBFBD>
Rem ͨ<><CDA8><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<2F><>ȫ<EFBFBD><C8AB><EFBFBD>á<EFBFBD><C3A1>˵<EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD>еġ<D0B5>
Rem <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƚ<EFBFBD>д<EFBFBD><D0B4>Ȩ<EFBFBD>Ż<EFBFBD>
Rem ϵͳ<CFB5><CDB3><EFBFBD>ݿ<EFBFBD><DDBF>ϡ<EFBFBD>
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><EFBFBD> Office 97 <20><><EFBFBD>µ<EFBFBD>ϵͳ DLL <20>ϵ<EFBFBD>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD>
Rem <20><>ȡȨ<C8A1><C8A8>
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><EFBFBD><EFBFBD>ı<EFBFBD> Outlook <20><> frmcache.dat <20>ļ<EFBFBD><C4BC>ϵ<EFBFBD> TS <20>û<EFBFBD><C3BB>ķ<EFBFBD><C4B7><EFBFBD>Ȩ<EFBFBD>ޡ<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><> Powerpoint <20>򵼸ij<F2B5BCB8>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD><EFBFBD>ͬʱ<CDAC><CAB1><EFBFBD><EFBFBD>
Rem һ<><D2BB><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>򵼡<EFBFBD>
Rem
If Exist "%O97INST%\Templates\<5C><>ʾ<EFBFBD>ĸ<EFBFBD>\<5C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>.pwz" Attrib +R "%O97INST%\Templates\<5C><>ʾ<EFBFBD>ĸ<EFBFBD>\<5C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>.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><><EFBFBD><EFBFBD>Ҫʹ<D2AA>ǹ<EFBFBD><C7B9><EFBFBD>Ա<EFBFBD>û<EFBFBD><C3BB><EFBFBD> Excel <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Access Wizards
Rem <20><> Access <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EEA3AC><EFBFBD><EFBFBD>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD> "Rem"<22><>
Rem <20><><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>Ȩ<EFBFBD>ޡ<EFBFBD>
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><EFBFBD> MsForms.Twd <20><> RefEdit.Twd <20>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
Rem Powerpoint <20><> Excel <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28>ļ<EFBFBD>/<2F><><EFBFBD><EFBFBD>Ϊ HTML<4D><4C>etc)<29><><EFBFBD><EFBFBD><EFBFBD>ġ<EFBFBD>
Rem <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Щ<EFBFBD><D0A9><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD>ǻ<EFBFBD><C7BB>ú<EFBFBD><C3BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD><DDB5>ļ<EFBFBD>
Rem <20><EFBFBD><E6BBBB>Ӧ<EFBFBD><D3A6><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
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><> SystemRoot <20>´<EFBFBD><C2B4><EFBFBD> msremote.sfs Ŀ¼<C4BF><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>
Rem ʹ<>á<EFBFBD><C3A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>еġ<D0B5><C4A1>ʼ<EFBFBD><CABC>ʹ<EFBFBD><CDB4>桱ͼ<E6A1B1><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
Rem
md %systemroot%\msremote.sfs > Nul: 2>&1
Rem #########################################################################
Rem
Rem <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>ġ<EFBFBD><C4A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ٲ<EFBFBD><D9B2>ҡ<EFBFBD><D2A1><EFBFBD>
Rem <20><><EFBFBD><EFBFBD><EFBFBD>ٲ<EFBFBD><D9B2>ҡ<EFBFBD><D2A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ<EFBFBD><D4B4><EFBFBD><EFBFBD>Ӱ<EFBFBD><D3B0>ϵͳ
Rem <20><><EFBFBD>ܡ<EFBFBD>
Rem
If Exist "%COMMON_STARTUP%\Microsoft <20>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>.lnk" Del "%COMMON_STARTUP%\Microsoft <20>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>.lnk" >Nul: 2>&1
Rem #########################################################################
Rem
Rem <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>ġ<EFBFBD><C4A1><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>ɾ<EFBFBD><C9BE> "Microsoft Office <20><><EFBFBD>ݹ<EFBFBD><DDB9><EFBFBD><EFBFBD><EFBFBD>.lnk" <20>ļ<EFBFBD><C4BC><EFBFBD>
Rem
If Exist "%COMMON_STARTUP%\Microsoft Office <20><><EFBFBD>ݹ<EFBFBD><DDB9><EFBFBD><EFBFBD><EFBFBD>.lnk" Del "%COMMON_STARTUP%\Microsoft Office <20><><EFBFBD>ݹ<EFBFBD><DDB9><EFBFBD><EFBFBD><EFBFBD>.lnk" >Nul: 2>&1
Rem #########################################################################
Rem
Rem <20><> SystemRoot <20>´<EFBFBD><C2B4><EFBFBD> msfslog.txt <20>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ն˷<D5B6><CBB7><EFBFBD><EFBFBD><EFBFBD>
Rem <20>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>ȫ<EFBFBD><C8AB><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8>
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><EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD><EFBFBD>ʹ·<CAB9><C2B7>ָ<EFBFBD><D6B8><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>
Rem <20><>Ŀ¼<C4BF><C2BC>
Rem
Rem <20><><EFBFBD><EFBFBD>Ŀǰ<C4BF><C7B0><EFBFBD>ڰ<EFBFBD>װģʽ<C4A3>У<EFBFBD><D0A3><EFBFBD><EFBFBD>ijɰ<C4B3>װģʽ<C4A3><CABD>
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><><EFBFBD><EFBFBD>ԭʼģʽ<C4A3><CABD>ִ<EFBFBD>У<EFBFBD><D0A3><EFBFBD><EFBFBD>Ļ<EFBFBD>ִ<EFBFBD><D6B4>ģʽ<C4A3><CABD>
If "%__OrigMode%" == "Exec" Change User /Execute > Nul:
Set __OrigMode=
Rem #########################################################################
Rem
Rem <20><><EFBFBD><EFBFBD> Ofc97Usr.Cmd <20><><EFBFBD><EFBFBD>ӳʵ<D3B3>ʰ<EFBFBD>װĿ¼<C4BF><C2BC>
Rem <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD> UsrLogn2.Cmd <20>ű<EFBFBD>
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 Ҫ<><D2AA>֤ Office 97 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><D0A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>κ<EFBFBD>
Echo Office 97 Ӧ<>ó<EFBFBD><C3B3><EFBFBD>֮ǰ<D6AE><C7B0>Ŀǰ<C4BF><C7B0>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>
Echo <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µ<EFBFBD>¼<EFBFBD><C2BC>
Echo.
Echo Microsoft Office 97 <20><><EFBFBD>û<EFBFBD>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѽ<EFBFBD><D1BD><EFBFBD>
Pause
:done