имеется скрипт
Код:

@echo off & color 1F
setlocal ENABLEDELAYEDEXPANSION
for /F "usebackq tokens=4 delims= " %%I in (`%SYSTEMROOT%\system32\chcp.com`) do set ACTCODEPAGE=%%I
"%SYSTEMROOT%\system32\chcp.com" %ACTCODEPAGE% >nul
SET KMSHOST=192.168.0.89
SET keyx86=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
SET keyx64=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
if exist "%ProgramFiles%\Microsoft Office\Office14\ospp.vbs" goto :Office2010x86
if exist "%ProgramFiles% (x86)\Microsoft Office\Office14\ospp.vbs" goto :Office2010x64
if exist "%ProgramFiles%\Microsoft Office\Office15\ospp.vbs" goto :Office2013x86
if exist "%ProgramFiles% (x86)\Microsoft Office\Office15\ospp.vbs" goto :Office2013x64
:Office2010x86
rem разрешить активацию обычным пользователям
cscript "%ProgramFiles%\Microsoft Office\Office14\ospp.vbs" /puserops
rem установить IP - KMSHOST - сервера
cscript "%ProgramFiles%\Microsoft Office\Office14\ospp.vbs" /sethst:%KMSHOST%
rem установить SN
cscript "%ProgramFiles%\Microsoft Office\Office14\ospp.vbs" /inpkey:%keyx86%
rem Активация Офиса
cscript "%ProgramFiles% (x86)\Microsoft Office\Office14\ospp.vbs" /act
EXIT
:Office2010x64
rem разрешить активацию обычным пользователям
cscript "%ProgramFiles% (x86)\Microsoft Office\Office14\ospp.vbs" /puserops
rem установить IP - KMSHOST - сервера
cscript "%ProgramFiles% (x86)\Microsoft Office\Office14\ospp.vbs" /sethst:%KMSHOST%
rem установить SN
cscript "%ProgramFiles% (x86)\Microsoft Office\Office14\ospp.vbs" /inpkey:%keyx64%
rem Активация Офиса
cscript "%ProgramFiles%\Microsoft Office\Office14\ospp.vbs" /act
EXIT
:Office2013x86
rem разрешить активацию обычным пользователям
cscript "%ProgramFiles%\Microsoft Office\Office15\ospp.vbs" /puserops
rem установить IP - KMSHOST - сервера
cscript "%ProgramFiles%\Microsoft Office\Office15\ospp.vbs" /sethst:%KMSHOST%
rem установить SN
cscript "%ProgramFiles%\Microsoft Office\Office15\ospp.vbs" /inpkey:%keyx86%
rem Активация Офиса
cscript "%ProgramFiles%\Microsoft Office\Office15\ospp.vbs" /act
EXIT
:Office2013x64
REM разрешить активацию обычным пользователям
cscript "%ProgramFiles% (x86)\Microsoft Office\Office15\ospp.vbs" /puserops
REM установить IP - KMSHOST - сервера
cscript "%ProgramFiles% (x86)\Microsoft Office\Office15\ospp.vbs" /sethst:%KMSHOST%
REM установить SN
cscript "%ProgramFiles% (x86)\Microsoft Office\Office15\ospp.vbs" /inpkey:%keyx64%
rem Активация Офиса
cscript "%ProgramFiles% (x86)\Microsoft Office\Office15\ospp.vbs" /act
EXIT
Необходимо условие проверяющие активировано ли Офис или нет.
Если нет запустить данный скрипт.
Текущий статус активации можно получить с помощью команды:
Код:

cscript "%ProgramFiles%\Microsoft Office\Office15\ospp.vbs" /dstatusall
вот вывод команды:
Код:

---Processing--------------------------
---------------------------------------
SKU ID: 2b88c4f2-ea8f-43cd-805e-4d41346e18a7
LICENSE NAME: Office 15, OfficeProPlusVL_MAK edition
LICENSE DESCRIPTION: Office 15, RETAIL(MAK) channel
LICENSE STATUS: ---UNLICENSED---
ERROR CODE: 0xC004F014
ERROR DESCRIPTION: The Software Licensing Service reported that the product key is not available.
---------------------------------------
SKU ID: 3e4294dd-a765-49bc-8dbd-cf8b62a4bd3d
LICENSE NAME: Office 15, OfficeVisioProVL_MAK edition
LICENSE DESCRIPTION: Office 15, RETAIL(MAK) channel
LICENSE STATUS: ---UNLICENSED---
ERROR CODE: 0xC004F014
ERROR DESCRIPTION: The Software Licensing Service reported that the product key is not available.
---------------------------------------
SKU ID: 4a5d124a-e620-44ba-b6ff-658961b33b9a
LICENSE NAME: Office 15, OfficeProjectProVL_KMS_Client edition
LICENSE DESCRIPTION: Office 15, VOLUME_KMSCLIENT channel
LICENSE STATUS: ---LICENSED---
ERROR CODE: 0x4004F040 (for information purposes only as the status is licensed)
ERROR DESCRIPTION: The Software Licensing Service reported that the product was activated but the owner should verify the Product Use Rights.
REMAINING GRACE: 179 days (259177 minute(s) before expiring)
Last 5 characters of installed product key: 2342K
Activation Type Configuration: ALL
DNS auto-discovery: KMS name not available
KMS machine registry override defined: 192.168.0.89:1688
Activation Interval: 120 minutes
Renewal Interval: 10080 minutes
KMS host caching: Enabled
---------------------------------------
SKU ID: b322da9c-a2e2-4058-9e4e-f59a6970bd69
LICENSE NAME: Office 15, OfficeProPlusVL_KMS_Client edition
LICENSE DESCRIPTION: Office 15, VOLUME_KMSCLIENT channel
LICENSE STATUS: ---LICENSED---
ERROR CODE: 0x4004F040 (for information purposes only as the status is licensed)
ERROR DESCRIPTION: The Software Licensing Service reported that the product was activated but the owner should verify the Product Use Rights.
REMAINING GRACE: 179 days (259177 minute(s) before expiring)
Last 5 characters of installed product key: GVGXT
Activation Type Configuration: ALL
DNS auto-discovery: KMS name not available
KMS machine registry override defined: 192.168.0.89:1688
Activation Interval: 120 minutes
Renewal Interval: 10080 minutes
KMS host caching: Enabled
---------------------------------------
SKU ID: e13ac10e-75d0-4aff-a0cd-764982cf541c
LICENSE NAME: Office 15, OfficeVisioProVL_KMS_Client edition
LICENSE DESCRIPTION: Office 15, VOLUME_KMSCLIENT channel
LICENSE STATUS: ---LICENSED---
ERROR CODE: 0x4004F040 (for information purposes only as the status is licensed)
ERROR DESCRIPTION: The Software Licensing Service reported that the product was activated but the owner should verify the Product Use Rights.
REMAINING GRACE: 179 days (259177 minute(s) before expiring)
Last 5 characters of installed product key: RM3B3
Activation Type Configuration: ALL
DNS auto-discovery: KMS name not available
KMS machine registry override defined: 192.168.0.89:1688
Activation Interval: 120 minutes
Renewal Interval: 10080 minutes
KMS host caching: Enabled
---------------------------------------
SKU ID: ed34dc89-1c27-4ecd-8b2f-63d0f4cedc32
LICENSE NAME: Office 15, OfficeProjectProVL_MAK edition
LICENSE DESCRIPTION: Office 15, RETAIL(MAK) channel
LICENSE STATUS: ---UNLICENSED---
ERROR CODE: 0xC004F014
ERROR DESCRIPTION: The Software Licensing Service reported that the product key is not available.
---------------------------------------
---------------------------------------
---Exiting-----------------------------
Прошу помощи!!!