I have just added Office 2010 to a lab image, and now have to re-activate it everytime I reimage each machine.  I guess it's no surprise, but I have learned that this is by MS design.  I have been able to accomplish this manually on a newly imaged machine by;

1) logging on administratively 2) opening CMD window 3)  cd ProgramFiles\Microsoft Office\Office14\   4) cscript ospp.vbs /act  5) logging off

I would love to script this for the final step in my deployment of a win7 machine.  I am, however, script-challenged.  Can you help me do this?

Answer Summary:
Run ospp.vbs from Office14 folder with /act option as a vbscript
0 Comments   [ - ] Hide Comments


Please log in to comment

Answer this question or Comment on this question for clarity



something like this should do: (untested)

Dim oFS, oShell, path, ret

Set oShell = WScript.CreateObject("WScript.Shell")
Set oFS = Wscript.CreateObject("Scripting.FileSystemObject")
path = "c:\Program Files\Microsoft Office\Office14\ospp.vbs"

ret = -1 'return -1 if the vbs is not found
if oFS.FileExists(path) then
    ret = oShell.Run("cscript.exe " & chr(34) & path & chr(34) & " /act", 1)
End If
Wscript.Quit(ret) 'return the exit code of ospp.vbs if executed
Answered 05/25/2012 by: pjgeutjens
Red Belt

Please log in to comment

I use

start /wait cscript "c:\program files\microsoft office\office14\ospp.vbs" /act

Answered 05/25/2012 by: SMal.tmcc
Red Belt

Please log in to comment

Hi and thanks for your answers.  I have been trying to get some consistency of results before writing again, and I can say that 

start /wait cscript "c:\program files\microsoft office\office14\ospp.vbs" /act

did work about 1/2 the time as I worked on both laptop carts and wired labs.  Sometimes I got an error message that suggested that the ospp.vbs hadn't started yet, and even said to first run ospp.vbs" /osppsvcrestart

so in my script-challenged way, I used the script

start /wait cscript "c:\program files\microsoft office\office14\ospp.vbs" /osppsvcrestart
start /wait cscript "c:\program files\microsoft office\office14\ospp.vbs" /act

It worked about 50 percent of the time still.  Is there a better way to structure that script?



Answered 10/03/2012 by: Bob Leach
White Belt

  • Bob- can you let me know where you placed the script above? (i.e. user config > scripts < start-up or computer confi > scripts < logon?
Please log in to comment