1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
| @ECHO OFF
if exist "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" ( cd /d "%ProgramFiles%\Microsoft Office\Office16" ) if exist "%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" ( cd /d "%ProgramFiles(x86)%\Microsoft Office\Office16" )
:WH cls echo ---------------------------------------------- echo 1. 零售版 Office Pro Plus 2016 转化为VOL版 echo 2. 零售版 Office Visio Pro 2016 转化为VOL版 echo 3. 零售版 Office Project Pro 2016 转化为VOL版 echo ----------------------------------------------
set /p tsk="请选择(1-3): " if not defined tsk goto:err if %tsk%==1 goto:convert_office if %tsk%==2 goto:convert_visio if %tsk%==3 goto:convert_project
:err goto :WH
:convert_office cls echo Convert Office2016 for /f %%x in ('dir /b ..\root\Licenses16\proplusvl_kms*.xrm-ms') do ( cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul ) for /f %%x in ('dir /b ..\root\Licenses16\proplusvl_mak*.xrm-ms') do ( cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul ) cscript ospp.vbs /inpkey:XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99 goto :end
:convert_visio cls echo Convert Visio2016 for /f %%x in ('dir /b ..\root\Licenses16\visio???vl_kms*.xrm-ms') do ( cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul ) for /f %%x in ('dir /b ..\root\Licenses16\visio???vl_mak*.xrm-ms') do ( cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul ) cscript ospp.vbs /inpkey:PD3PC-RHNGV-FXJ29-8JK7D-RJRJK goto :end
:convert_project cls echo Convert Project2016 for /f %%x in ('dir /b ..\root\Licenses16\project???vl_kms*.xrm-ms') do ( cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul ) for /f %%x in ('dir /b ..\root\Licenses16\project???vl_mak*.xrm-ms') do ( cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul ) cscript ospp.vbs /inpkey:YG9NW-3K39V-2T3HJ-93F3Q-G83KT goto :end
:end pause >nul exit
|