@echo off :TNMENU cls set KmsServer=kms.tn.edu.tw echo ------------------------------------------------------------------------- echo - 臺南市教育局 大量授權啟用程式 (大橋國小王聖閔老師修改 108.2.20) echo - echo - ** 請記得使用滑鼠右鍵 以系統管理員身份執行此程式 ** echo - echo - 1.啟用Windows 7/8/8.1/10 echo - 2.啟用Office 2010 echo - 3.啟用Office 2013 echo - 4.啟用Office 2016/2019 echo - 0.Exit echo -------------------------------------------------------------------------- set choice= set /p choice= Please choose 1-4, 0 to Exit : if '%choice%'=='1' goto WIN7 if '%choice%'=='2' goto OFFICE2010 if '%choice%'=='3' goto OFFICE2013 if '%choice%'=='4' goto OFFICE2016 if '%choice%'=='0' goto END echo "%choice%" is not vaild, try again goto TNMENU :WIN7 set LANG=cht set WIN7ERRMSG1=- 系統缺少 slmgr.vbs 這個用啟用程式 set WIN7ERRMSG2=- 系統無法常啟用。 if not exist %systemroot%\system32\slmgr.vbs goto WIN7ERROR cls @echo off echo Windows 7/8/8.1/10 啟用中... echo 設定 KMS伺服器:%KmsServer% cscript C:\Windows\System32\slmgr.vbs /skms %KmsServer% >nul 2>&1 cscript C:\Windows\System32\slmgr.vbs /ipk VK7JG-NPHTM-C97JM-9MPGT-3V66T >nul 2>&1 cscript C:\Windows\System32\slmgr.vbs /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX >nul 2>&1 cscript C:\Windows\System32\slmgr.vbs /ipk M7XTQ-FN8P6-TTKYV-9D4CC-J462D >nul 2>&1 cscript C:\Windows\System32\slmgr.vbs /ipk DCPHK-NFMTC-H88MJ-PFHPY-QJ4BJ >nul 2>&1 cscript C:\Windows\System32\slmgr.vbs /ato >nul 2>&1 cls cscript C:\Windows\System32\slmgr.vbs /dli pause goto :TNMENU :WIN7ERROR echo = !!!ERROR!!! = echo %WIN7ERRMSG1% echo %WIN7ERRMSG2% pause goto :TNMENU :OFFICE2010 if exist "%programfiles% (x86)\Microsoft Office\OFFICE14\OSPP.VBS" goto OFFICEx64 if exist "%programfiles%\Microsoft Office\OFFICE14\OSPP.VBS" goto OFFICEx32 goto OFFICEERR :OFFICEx64 echo ------------------------------------- echo You are using 64bit operation system. echo KMS Server is echo 啟用中... echo ------------------------------------- cscript "%ProgramFiles% (x86)\Microsoft Office\OFFICE14\OSPP.VBS" /osppsvcrestart >nul cscript "%ProgramFiles% (x86)\Microsoft Office\OFFICE14\OSPP.VBS" /sethst:%KmsServer% >nul cscript "%ProgramFiles% (x86)\Microsoft Office\OFFICE14\OSPP.VBS" /act goto office_end :OFFICEx32 echo ------------------------------------- echo You are using 32bit operation system. echo KMS Server is %KmsServer% echo 啟用中... echo ------------------------------------- 'cscript "%ProgramFiles%\Microsoft Office\OFFICE14\OSPP.VBS" /osppsvcrestart >nul cscript "%ProgramFiles%\Microsoft Office\OFFICE14\OSPP.VBS" /sethst:%KmsServer% >nul cscript "%ProgramFiles%\Microsoft Office\OFFICE14\OSPP.VBS" /act goto office_end :OFFICE2013 if exist "%programfiles% (x86)\Microsoft Office\OFFICE15\OSPP.VBS" goto OFFICE15x64 if exist "%programfiles%\Microsoft Office\OFFICE15\OSPP.VBS" goto OFFICE15x32 goto OFFICEERR :OFFICE15x64 echo ------------------------------------- echo You are using 64bit operation system. echo KMS Server is echo 啟用中... echo ------------------------------------- rem cscript "%ProgramFiles% (x86)\Microsoft Office\OFFICE15\OSPP.VBS" /osppsvcrestart >nul cscript "%ProgramFiles% (x86)\Microsoft Office\OFFICE15\OSPP.VBS" /sethst:%KmsServer% >nul cscript "%ProgramFiles% (x86)\Microsoft Office\OFFICE15\OSPP.VBS" /act goto office_end :OFFICE15x32 echo ------------------------------------- echo You are using 32bit operation system. echo KMS Server is %KmsServer% echo 啟用中... echo ------------------------------------- rem cscript "%ProgramFiles%\Microsoft Office\OFFICE15\OSPP.VBS" /osppsvcrestart >nul cscript "%ProgramFiles%\Microsoft Office\OFFICE15\OSPP.VBS" /sethst:%KmsServer% >nul cscript "%ProgramFiles%\Microsoft Office\OFFICE15\OSPP.VBS" /act goto office_end :OFFICE2016 @echo OFFICE 2016/2019/365Mondo大量授權版 啟用中請稍候..... cscript C:\Windows\System32\slmgr.vbs -skms %KmsServer% >nul 2>&1 cscript C:\Windows\System32\slmgr.vbs -ipk HCR8Y-NWFMQ-9F4Y9-3F8GD-TCQWG >nul 2>&1 cscript C:\Windows\System32\slmgr.vbs -ato e914ea6e-a5fa-4439-a394-a9bb3293ca09 >nul 2>&1 cscript C:\Windows\System32\slmgr.vbs -ipk NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP >nul 2>&1 cscript C:\Windows\System32\slmgr.vbs -ato 85dd8b5f-eaa4-4af3-a628-cce9e77c9a03 >nul 2>&1 @cls if exist "%programfiles% (x86)\Microsoft Office\OFFICE16\OSPP.VBS" goto OFFICE16x64 if exist "%programfiles%\Microsoft Office\OFFICE16\OSPP.VBS" goto OFFICE16x32 goto OFFICEERR :OFFICE16x64 echo ------------------------------------- echo You are using 64bit operation system. echo KMS Server is %KmsServer% echo 啟用中... echo ------------------------------------- cscript "%ProgramFiles% (x86)\Microsoft Office\OFFICE16\OSPP.VBS" /sethst:%KmsServer% >nul cscript "%ProgramFiles% (x86)\Microsoft Office\OFFICE16\OSPP.VBS" /act goto office_end :OFFICE16x32 echo ------------------------------------- echo You are using 32bit operation system. echo KMS Server is %KmsServer% echo 啟用中... echo ------------------------------------- cscript C:\Windows\System32\slmgr.vbs -skms %KmsServer% > nul cscript C:\Windows\System32\slmgr.vbs -ipk HCR8Y-NWFMQ-9F4Y9-3F8GD-TCQWG > nul cscript C:\Windows\System32\slmgr.vbs -ato e914ea6e-a5fa-4439-a394-a9bb3293ca09 cscript "%ProgramFiles%\Microsoft Office\OFFICE16\OSPP.VBS" /sethst:%KmsServer% >nul cscript "%ProgramFiles%\Microsoft Office\OFFICE16\OSPP.VBS" /act goto office_end :OFFICE365MonDo cscript C:\Windows\System32\slmgr.vbs -skms %KmsServer% >nul cscript C:\Windows\System32\slmgr.vbs -ipk HCR8Y-NWFMQ-9F4Y9-3F8GD-TCQWG >nul cscript C:\Windows\System32\slmgr.vbs -ato e914ea6e-a5fa-4439-a394-a9bb3293ca09 goto office_end :OFFICE2019 cscript C:\Windows\System32\slmgr.vbs -skms %KmsServer% >nul cscript C:\Windows\System32\slmgr.vbs -ipk NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP >nul cscript C:\Windows\System32\slmgr.vbs -ato 85dd8b5f-eaa4-4af3-a628-cce9e77c9a03 goto office_end :OFFICEERR set LANG=cht set OFFICEERRMSG1=- 請確認您已完成OFFICE 2010/2013/2016/2019安裝 echo = !!!ERROR!!! = echo %OFFICEERRMSG1% pause goto :TNMENU :office_end echo 啟動程序執行完成.. echo ============================================================================== echo 請注意:上方需有 <Product activation successful> 或 <產品已成功啟用> 出現, echo 才表示您的 Office 啟動成功!! echo ============================================================================== pause goto :TNMENU :END