所以我正在创建一个 LEGIT Office 2013 激活器,它使用我们的 Genuine 密钥并运行 /act 脚本来激活它。
因此,为了检查 Office 的 x32 或 x64 位,我让 cmd 搜索名为 ospp.vbs 的文件,如果在 x86 中找到则为 x32,如果在程序文件中找到则为 x64。但是如果在 x32 中没有找到它,它会继续下一步,但它告诉我 /microsoft 不是预期的,然后它会关闭?这是我的 CMD 文件:
@echo off
echo.Microsoft Office 2013 Activator
pause >nul
cls
NET SESSION >nul 2>&1
IF %ERRORLEVEL% EQU 0 (
goto :Start
) ELSE (
echo.
echo.
echo.
echo. ERROR: YOU ARE NOT AN ADMIN!
ECHO. PLEASE RUN THIS TOOL AS AN ADMIN IN ORDER FOR IT TO WORK PROPERLY
ECHO. PRESS ANY KEY TO EXIT THE TOOL
PAUSE >NUL
EXIT
)
:Start
type "C:\program files (x86)\microsoft office\office15\ospp.vbs" >NUL 2>NUL
if %ERRORLEVEL% EQU 0 (
echo.x32 Office 2013 on x64 Machine Found.
echo.Why did you get x32 Office on an x64 Machine?
echo.Preparing to activate...
pause >nul
cls
goto :x32
) ELSE (
goto :x64check
)
:x64check
type "C:\program files\microsoft office\office15\ospp.vbs" >NUL 2>NUL
if %ERRORLEVEL% EQU 0 (
echo.x64 Office 2013 on x64 Machine Found
echo.or
echo.x32 Office 2013 on x32 Machine Found
echo.Preparing to Activate...
pause >nul
cls
goto :x64
) ELSE (
echo.Office 2013 Could not be found on this machine...
echo.Are you sure Office 2013 is installed?
echo.If it is installed , search for ospp.vbs in C:\program Files (x86)\Microsoft Office\Office 15\
pause >nul
cls
)
:x32
cd "C:\program files (x86)\microsoft office\Office15\"
cls
cscript ospp.vbs /remhst
cls
cscript ospp.vbs /act
cls
cscript ospp.vbs /dstatus
pause >nul
echo Check the Above to see if Activation succeded or press any key to open winword and check it maunally.
pause >nul
start winword
:x64
cd "C:\program files\microsoft office\Office15\"
cls
cscript ospp.vbs /remhst
cls
cscript ospp.vbs /act
cls
cscript ospp.vbs /dstatus
pause >nul
echo Check the Above to see if Activation succeded or press any key to open winword and check it maunally.
pause >nul
start winword
你能告诉我我的问题在哪里吗?谢谢!