Install Office 2007 with Startup Script from GPO

Posted on 2008-10-28
Last Modified: 2010-04-21

I am attempting to install Office 2007 ProPlus on all my Network Workstations using Group Policy. I have hit many snags. After reading articles I have determined the best way to install and use a MSP file to fill in all the info and unistall office 2003 is to use a GPO with a startup script. I follow the instructions here:
And below is the startup script, I cannot get it to work, What extension should this save as? If I attempt to save it as a bat it does not work, If I try to run as a VBS I get syntax errors.

Has anyone had any success? What will work?  Should I go about this another way?


REM *********************************************************************

REM Environment customization begins here. Modify variables below.

REM *********************************************************************

REM Get ProductName from the Office product's core Setup.xml file.

set ProductName=ProPlus

REM Set DeployServer to a network-accessible location containing the Office source files.

set DeployServer=\\\ManagedApps\Office2007\

REM Set ConfigFile to the configuration file to be used for deployment REM (required)

set ConfigFile=\\\ManagedApps\Office2007\ProPlus.WW\config.xml

REM Set LogLocation to a central directory to collect log files.

set LogLocation=\\\ManagedApps\Office2007\Office12Logs

REM *********************************************************************

REM Deployment code begins here. Do not modify anything below this line.

REM *********************************************************************

IF NOT "%ProgramFiles(x86)%"=="" SET WOW6432NODE=WOW6432NODE\

reg query HKEY_LOCAL_MACHINE\SOFTWARE\%WOW6432NODE%Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%

if %errorlevel%==1 (goto DeployOffice) else (goto End)

REM If 1 returned, the product was not found. Run setup here.


start /wait %DeployServer%\setup.exe /config %ConfigFile%

echo %date% %time% Setup ended with error code %errorlevel%. >> %LogLocation%\%computername%.txt

REM If 0 or other was returned, the product was found or another error occurred. Do nothing.



Open in new window

Question by:cwconley
  • 14
  • 5
  • 2
LVL 38

Accepted Solution

Shift-3 earned 200 total points
ID: 22822317
It's a batch script so it should be saved with a .cmd or .bat extension.  

Remove the trailing backslash from this line:
set DeployServer=\\\ManagedApps\Office2007\

Also, check both share permissions and NTFS permissions on the \\\ManagedApps directory to make sure the Everyone group has Read and Execute.

Author Comment

ID: 22822769
Thanks for the info, that helps,

It still is not installing office 2007, I have mad the changes on both the share and the ntfs, I am going to triple check to make sure they are in effect.

It seems to be running or attemting to run the script but it isn't adding a log file so something is going right.

LVL 38

Expert Comment

ID: 22822817
Grant the Everyone group Modify permission to \\\ManagedApps\Office2007\Office12Logs to allow the log file to be written.

Author Comment

ID: 22823284
hmm, I have given the "Everyone" group Read & Execute and Modify Permissions for the ManagedApps folder which looks like it propegates in to the Office12logs folder. Is there anyway I can test the script I think it is bombing out before it even gets there.

If I try to run the script manually a dos window opens up and closes very fast.

LVL 38

Expert Comment

ID: 22823335
Open a command prompt and run the script from there.  It should let you see any errors that come up.

Author Comment

ID: 22823419
Ok here is what it returns, I am looking through it now to see if I can fig out what the prob is.

Microsoft Windows XP [Version 5.1.2600]

(C) Copyright 1985-2001 Microsoft Corp.



C:\>REM *********************************************************************

C:\>REM Environment customization begins here. Modify variables below.

C:\>REM *********************************************************************

C:\>REM Get ProductName from the Office product's core Setup.xml file.

C:\>set ProductName=ProPlus

C:\>REM Set DeployServer to a network-accessible location containing the Office

source files.

C:\>set DeployServer=\\\ManagedApps\Office2007

C:\>REM Set ConfigFile to the configuration file to be used for deployment REM (


C:\>set ConfigFile=\\\ManagedApps\Office2007\updates\config.msp

C:\>REM Set LogLocation to a central directory to collect log files.

C:\>set LogLocation=\\\ManagedApps\Office2007\Office12Logs

C:\>REM *********************************************************************

C:\>REM Deployment code begins here. Do not modify anything below this line.

C:\>REM *********************************************************************

C:\>IF NOT "" == "" SET WOW6432NODE=WOW6432NODE\

C:\>reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Unins




    Publisher   REG_SZ  Microsoft Corporation

    CacheLocation       REG_SZ  C:\MSOCache\All Users

    Comments    REG_SZ

    DisplayIcon REG_SZ  C:\Program Files\Common Files\Microsoft Shared\OFFICE12\

Office Setup Controller\OSETUP.DLL,1

    DisplayName REG_SZ  Microsoft Office Professional Plus 2007

    DisplayVersion      REG_SZ  12.0.4518.1014

    HelpLink    REG_SZ

    HelpTelephone       REG_SZ

    InstallLocation     REG_SZ  C:\Program Files\Microsoft Office

    ModifyPath  REG_SZ  "C:\Program Files\Common Files\Microsoft Shared\OFFICE12

\Office Setup Controller\setup.exe" /modify PROPLUS /dll OSETUP.DLL

    NoElevateOnModify   REG_DWORD       0x1

    NoModify    REG_DWORD       0x0

    NoRemove    REG_DWORD       0x0

    NoRepair    REG_DWORD       0x1

    PackageIds  REG_MULTI_SZ    OfficeMUI.en-us\0OfficeMUISet.en-us\0ExcelMUI.en



    ProductCodes        REG_MULTI_SZ    {90120000-006E-0409-0000-0000000FF1CE}\0









    SkuComponents       REG_MULTI_SZ    C:\Program Files\Common Files\Microsoft

Shared\OFFICE12\Office Setup Controller\InfoPath.en-us\setup.xml\0C:\Program Fil

es\Common Files\Microsoft Shared\OFFICE12\Office Setup Controller\Proofing.en-us

\setup.xml\0C:\Program Files\Common Files\Microsoft Shared\OFFICE12\Office Setup

 Controller\Publisher.en-us\setup.xml\0C:\Program Files\Common Files\Microsoft S

hared\OFFICE12\Office Setup Controller\Access.en-us\setup.xml\0C:\Program Files\

Common Files\Microsoft Shared\OFFICE12\Office Setup Controller\Office.en-us\setu

p.xml\0C:\Program Files\Common Files\Microsoft Shared\OFFICE12\Office Setup Cont

roller\PowerPoint.en-us\setup.xml\0C:\Program Files\Common Files\Microsoft Share

d\OFFICE12\Office Setup Controller\Rosebud.en-us\setup.xml\0C:\Program Files\Com

mon Files\Microsoft Shared\OFFICE12\Office Setup Controller\Excel.en-us\setup.xm

l\0C:\Program Files\Common Files\Microsoft Shared\OFFICE12\Office Setup Controll

er\Outlook.en-us\setup.xml\0C:\Program Files\Common Files\Microsoft Shared\OFFIC

E12\Office Setup Controller\PROPLUS\setup.xml\0C:\Program Files\Common Files\Mic

rosoft Shared\OFFICE12\Office Setup Controller\Word.en-us\setup.xml\0\0

    SystemComponent     REG_DWORD       0x0

    UninstallString     REG_SZ  "C:\Program Files\Common Files\Microsoft Shared\

OFFICE12\Office Setup Controller\setup.exe" /uninstall PROPLUS /dll OSETUP.DLL

    URLInfoAbout        REG_SZ

    URLUpdateInfo       REG_SZ

    ShellUITransformLanguage    REG_SZ  en-US

    ProductID   REG_SZ  89409-707-6798624-65200

C:\>if 0 == 1 (goto DeployOffice )  else (goto End )



Open in new window


Author Comment

ID: 22823443
hmm it looks as though it thinks office 2007 is already installed, right? That is wierd, maybe it has something to do with this pc having Visio 2007? I will run on another pc to see what I get.


Author Comment

ID: 22823521
Ok on the other PC it looks like it is running the deploy section. It is just paused at that section so assume it is installing. I will give a bit and update as to the status when it finishes
LVL 38

Expert Comment

ID: 22823576
Yes, the reg query command found the key it was looking for, so it is behaving as if Office 2007 is already installed.

Author Comment

ID: 22823705
Alright, it looks like it unistalled Office 2003 and installed Office 2007. Took about 15 min and autorebooted.

Ok so next step is to get it to work from a stratup sciprt, I will test on another machine without any 2007 products.

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.


Author Comment

ID: 22823714
Does it matter where you put the startup script?

Author Comment

ID: 22823742
I wonder If I could just remove that so it would just unistall all office prods? Just in case I run across this in the production enviroment
LVL 38

Expert Comment

ID: 22824000
Edit the GPO and browse to the node Computer Configuration\Windows Settings\Scripts\Startup.  Click the Show Files button.  Copy your script into the window which comes up.  Then click the Add button, hit Browse, and point to that file.

Author Comment

ID: 22825132
Ok I did that. Do I need to add any permissions.

If I copy the script file to the pc and run it it works.


Author Comment

ID: 22825269
hmm still not running as a startup script

How strange. Any other things I should try?


Author Comment

ID: 22825295
If I browse to the startup script on the network it seems to run fine,

I am gonna try looking to see how the sysvol is shared that may be the problem.


Expert Comment

ID: 22825330
Yes run the script from the USER Configuration in group policy not the computer configuration

Author Comment

ID: 22825530
hmm but you can only run login scripts as the user, don't I want a startup script?

Assisted Solution

MrHuggybearuk earned 50 total points
ID: 22825716
I may get flamed for this but i see them as the same thing

Difference i see is i use startup scripts to execute commands on the local workstation and use login scripts for everything that requires the user credentails for authentication.....

(Ducks and takes cover)

Author Comment

ID: 22826318
ok wasn't sure if that was what I wanted to do or not. I will give it try.


Author Closing Comment

ID: 31510743
Thanks For the help.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now