Office 2010 silent activation after unattended installation

Solution 1:

In case anyone was wondering - Office installs OSPP.VBS in the office14 directory and can handle office activation, among other things.

In OCT I set it to run c:\windows\system32\cscript C:\"Program Files (x86)\Microsoft Office\Office14\OSPP.VBS" /act during post-installation.

All office products are activated after that. I have it silent install Visio, Project and then Office and have Office kick off the activation after and all three products are activated at once.

Solution 2:

Not to muddy the waters on this post but I set this up using this command in OCT:
[WindowsFolder]\system32\cscript [INSTALLLOCATION]\OSPP.VBS
With the paramater of /act

Just in case someone else needs that info. Ross


Solution 3:

Just chuck this batch in your post sysprep script, should do the trick for you. Tested working on 32bit and 64bit systems as well as different OSes.

Maybe someone can vbs this one or whatever.

activateproper.cmd

REM CUSTOMER NAME HERE
REM DATE LAST MODIFIED

set _win7vlk=XXXXX-8FFQX-YYYYY-33XHT-ZZZZZ
set _2010vlk=YYYYY-YYYYY-WQGB6-KW8P8-XXXXX

REM Use current working dir
cd /d "%~dp0"

if not defined _win7vlk if not defined _2010vlk goto :nokey

echo Checking for internet connectivity needed to activate
echo This screen will not progress until internet is established
echo If you are using firewall please disable the firewall temporarily

:LOOP
PING -n 3 google.com|find "TTL" >NUL
IF NOT ERRORLEVEL 1 goto :ENDLOOP
IF     ERRORLEVEL 1 goto :LOOP
:ENDLOOP
echo Internet Detected

echo Change the time
net time \\LANMACHINEWITHCORRECTTIME /set /y

echo Prompt to activate Windows 7 if needed
if exist "%windir%\system32\slmgr.vbs" FOR /F "tokens=5" %%a in ('cscript "%windir%\system32\slmgr.vbs" -xpr') do (set _act=%%a)
if "%_act%" neq "activated." if defined _win7vlk (
    cscript "%windir%\system32\slmgr.vbs" -ipk %_win7vlk%
    cscript "%windir%\system32\slmgr.vbs" -ato
    )

echo Prompt to activate Office 2010 if needed
if exist "%PROGRAMFILES%\Microsoft Office\Office14\WINWORD.exe" set _offver=%PROGRAMFILES%
if exist "%PROGRAMFILES% (x86)\Microsoft Office\Office14\WINWORD.exe" set _offver=%PROGRAMFILES% (x86)

if defined _offver if defined _2010vlk (FOR /F "tokens=3* delims=: " %%a in ('cscript "%_offver%\Microsoft Office\Office14\OSPP.VBS" /dstatus') do (
    if "%%a" == "---OOB_GRACE---" (cscript "%_offver%\Microsoft Office\Office14\OSPP.VBS" /inpkey:%_2010vlk%
                    cscript "%_offver%\Microsoft Office\Office14\OSPP.VBS" /act)
    if "%%a" == "---OOT_GRACE---" (cscript "%_offver%\Microsoft Office\Office14\OSPP.VBS" /inpkey:%_2010vlk%
                    cscript "%_offver%\Microsoft Office\Office14\OSPP.VBS" /act)
    if "%%a" == "---NOTIFICATIONS---" (cscript "%_offver%\Microsoft Office\Office14\OSPP.VBS" /inpkey:%_2010vlk%
                    cscript "%_offver%\Microsoft Office\Office14\OSPP.VBS" /act)
    ))



:nokey