/build/static/layout/Breadcrumb_cap_w.png

Script to re-activate Office 2010 after shipping new image (altiris 6.9)

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?


0 Comments   [ + ] Show comments

Answers (3)

Answer Summary:
Run ospp.vbs from Office14 folder with /act option as a vbscript
Posted by: pjgeutjens 12 years ago
Red Belt
0

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
Posted by: SMal.tmcc 12 years ago
Red Belt
0

I use

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

Posted by: Bob Leach 12 years ago
White Belt
0

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?

Thanks,

Bob


Comments:
  • Bob- can you let me know where you placed the script above? (i.e. user config > scripts < start-up or computer confi > scripts < logon? - sagunseanchetry 10 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ