Advertisement
9usdfu98ds

Office 2021 activation.bat

Dec 12th, 2021
8,558
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. title Activate Microsoft Office Professional Plus 2021
  3. (cd /d "%~dp0")&&(NET FILE||(powershell -nop start-process -FilePath '%0' -verb runas)&(NET FILE||exit /B)) >nul 2>&1
  4. cls
  5. if exist "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office16"
  6. ::if exist "%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office16"
  7. echo %CD% | find /I "Microsoft Office\Office16" >nul
  8. if NOT %ERRORLEVEL% EQU 0 echo Error! Office not found. & echo. & pause & exit /B
  9. (cscript //nologo ospp.vbs /dstatus | find /I "LICENSED" && goto licensed) >nul 2>&1
  10. for /f %%x in ('dir /b ..\root\Licenses16\ProPlus2021VL_KMS*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x"
  11. :continue
  12. REG ADD "HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\16.0\Common\Internet" /v "UseOnlineContent" /t REG_DWORD /d "0" /f
  13. REG ADD "HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\16.0\Common\SignIn" /v "SignInOptions" /t REG_DWORD /d "3" /f
  14. REG ADD "HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\16.0\Common\Privacy" /v "DisconnectedState" /t REG_DWORD /d "2" /f
  15. REG ADD "HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\16.0\Common\Privacy" /v "UserContentDisabled" /t REG_DWORD /d "2" /f
  16. REG ADD "HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\16.0\Common\Privacy" /v "DownloadContentDisabled" /t REG_DWORD /d "2" /f
  17. REG ADD "HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\16.0\Common\Privacy" /v "ControllerConnectedServicesEnabled" /t REG_DWORD /d "2" /f
  18. REG ADD "HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\Common\ClientTelemetry" /v "SendTelemetry" /t REG_DWORD /d "3" /f
  19. cscript //nologo ospp.vbs /ckms-domain
  20. cscript //nologo ospp.vbs /remhst
  21. cscript //nologo ospp.vbs /unpkey:PG343
  22. cscript //nologo ospp.vbs /unpkey:6F7TH
  23. cscript //nologo ospp.vbs /sethst:kms.digiboy.ir
  24. cscript //nologo ospp.vbs /setprt:1688
  25. cscript //nologo ospp.vbs /inpkey:FXYTK-NJJ8C-GB6DW-3DYQT-6F7TH
  26. cscript //nologo ospp.vbs /act
  27. cscript //nologo ospp.vbs /dstatus
  28. echo.
  29. pause
  30. exit /B
  31. :licensed
  32. cscript //nologo ospp.vbs /dstatus
  33. echo.
  34. echo Office appears to be already activated.
  35. echo.
  36. CHOICE /C YN /N /M "Are you sure you want to continue (Y/N)?"
  37. if %ERRORLEVEL% EQU 1 goto continue
  38. exit /B
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement