|
本帖最后由 wangtingting118 于 2022-1-13 20:23 编辑
如题有哪位知道:PE如何能实现office2003精简版中的!)安装.cmd的自动运行?
其中!)安装.cmd的内容如下:
@Echo Off
title ★ office2003sp3 四合一绿色精简版 ★
mode con: cols=70 lines=18
color 2f
ver|find "5.">nul&&goto st
%1 mshta vbscript:createobject("shell.application").shellexecute("""%~0""","::",,"runas",1)(window.close)&&exit /b
:st
cls
echo.
echo.
echo 正在安装 office2003sp3 四合一绿色精简版,请稍候......
echo.
echo.
echo ------------------------- 2018.01.28 by xb21cn -----------------------
echo.
echo.
echo 支持 windows x86 x64 全系列
echo.
echo.
echo 正在安装,请耐心等待…………
echo.
set route=%cd%
set route=%route:\=\\%
copy "office.dat" "%temp%\test.dat" /y >nul 2>nul
FR.exe "%temp%\test.dat" -fic:"D:\\OFFICE2003" -t:"%route%"
IF /I NOT "%PROCESSOR_ARCHITECTURE%"=="AMD64" (FR.exe "%temp%\test.dat" -fic:"\Wow6432Node" -t:"")
regedit /s %temp%\test.dat
del %temp%\test.dat
mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\Word 2003.lnk""):b.TargetPath=""%CD%\WINWORD.exe"":b.WorkingDirectory=""%~dp0"":b.Save:close")&SET E=完成!
mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\Excel 2003.lnk""):b.TargetPath=""%CD%\EXCEL.exe"":b.WorkingDirectory=""%~dp0"":b.Save:close")&SET E=完成!
set "smpo=%ProgramData%\Microsoft\Windows\Start Menu\Programs\Office 2003"
ver|find "5.">nul&&set "smpo=%USERPROFILE%\「开始」菜单\程序\Office 2003"
md "%smpo%"
mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(""%smpo%"" & ""\Word2003.lnk""):b.TargetPath=""%CD%\WINWORD.exe"":b.WorkingDirectory=""%~dp0"":b.Save:close")&SET E=完成!
mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(""%smpo%"" & ""\Excel2003.lnk""):b.TargetPath=""%CD%\EXCEL.exe"":b.WorkingDirectory=""%~dp0"":b.Save:close")&SET E=完成!
mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(""%smpo%"" & ""\PowerPnt2003.lnk""):b.TargetPath=""%CD%\POWERPNT.exe"":b.WorkingDirectory=""%~dp0"":b.Save:close")&SET E=完成!
mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(""%smpo%"" & ""\Access2003.lnk""):b.TargetPath=""%CD%\MSACCESS.exe"":b.WorkingDirectory=""%~dp0"":b.Save:close")&SET E=完成!
if NOT EXIST "%windir%\fonts\serife.fon" copy /y serife.fon "%windir%\fonts\serife.fon">nul
if NOT EXIST "%APPDATA%\Microsoft\Templates" md "%APPDATA%\Microsoft\Templates"
copy /y my.dot "%APPDATA%\Microsoft\Templates\Normal.dot">nul
if NOT EXIST "%windir%\system32\MSXML5.DLL" (regsvr32 /s MSXML5.DLL)
regsvr32 /s fm20.dll
regsvr32 /s FM20CHS.DLL
regsvr32 /s VBE6.DLL
regsvr32 /s MSADDNDR.DLL
regsvr32 /s 2052\TBLHEAD.DLL
regsvr32 /s 2052\SYMINPUT.DLL
echo [Version]>%temp%\re.inf
echo Signature="$CHICAGO$">>%temp%\re.inf
echo [Defaultinstall]>>%temp%\re.inf
RUNDLL32.EXE SETUPAPI.DLL,InstallHinfSection DefaultInstall 128 %temp%\re.inf
del /q %temp%\re.inf
exit
其中,office2003的文件夹在虚拟磁盘Y盘的PETOOLS文件夹中,请问我用以下命令语句:ENVI OPDir=Y:\PETOOLSEXEC !%OPDir%\Office2003\!)安装.cmd
为什么不能自动运行?
|
|