?
Solved

Install Office 2007 with Startup Script from GPO

Posted on 2008-10-28
21
Medium Priority
?
1,125 Views
Last Modified: 2010-04-21
Greetings!

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:
http://technet.microsoft.com/en-us/library/cc179134.aspx
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?




setlocal
 
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=\\10.1.1.14\ManagedApps\Office2007\
 
REM Set ConfigFile to the configuration file to be used for deployment REM (required)
set ConfigFile=\\10.1.1.14\ManagedApps\Office2007\ProPlus.WW\config.xml
 
REM Set LogLocation to a central directory to collect log files.
set LogLocation=\\10.1.1.14\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.
:DeployOffice
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.
:End
 
Endlocal

Open in new window

0
Comment
Question by:cwconley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 14
  • 5
  • 2
21 Comments
 
LVL 38

Accepted Solution

by:
Shift-3 earned 800 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=\\10.1.1.14\ManagedApps\Office2007\

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

Author Comment

by:cwconley
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.

0
 
LVL 38

Expert Comment

by:Shift-3
ID: 22822817
Grant the Everyone group Modify permission to \\10.1.1.14\ManagedApps\Office2007\Office12Logs to allow the log file to be written.
0
Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 

Author Comment

by:cwconley
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.



0
 
LVL 38

Expert Comment

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

Author Comment

by:cwconley
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:\>startup
 
C:\>setlocal
 
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=\\10.1.1.14\ManagedApps\Office2007
 
C:\>REM Set ConfigFile to the configuration file to be used for deployment REM (
required)
 
C:\>set ConfigFile=\\10.1.1.14\ManagedApps\Office2007\updates\config.msp
 
C:\>REM Set LogLocation to a central directory to collect log files.
 
C:\>set LogLocation=\\10.1.1.14\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
tall\ProPlus
 
! REG.EXE VERSION 3.0
 
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ProPlus
    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
-us\0OutlookMUI.en-us\0PowerPointMUI.en-us\0RosebudMUI.en-us\0InfoPathMUI.en-us\
0Proof.es-es\0Proof.fr-fr\0Proof.en-us\0Proofing.en-us\0PublisherMUI.en-us\0Word
MUI.en-us\0AccessMUI.en-us\0AccessMUISet.en-us\0ProPlusWW\0\0
    ProductCodes        REG_MULTI_SZ    {90120000-006E-0409-0000-0000000FF1CE}\0
{90120000-0115-0409-0000-0000000FF1CE}\0{90120000-0016-0409-0000-0000000FF1CE}\0
{90120000-001A-0409-0000-0000000FF1CE}\0{90120000-0018-0409-0000-0000000FF1CE}\0
{90120000-0010-0409-0000-0000000FF1CE}\0{90120000-0044-0409-0000-0000000FF1CE}\0
{90120000-001F-0C0A-0000-0000000FF1CE}\0{90120000-001F-040C-0000-0000000FF1CE}\0
{90120000-001F-0409-0000-0000000FF1CE}\0{90120000-002C-0409-0000-0000000FF1CE}\0
{90120000-0019-0409-0000-0000000FF1CE}\0{90120000-001B-0409-0000-0000000FF1CE}\0
{90120000-0015-0409-0000-0000000FF1CE}\0{90120000-0117-0409-0000-0000000FF1CE}\0
{90120000-0011-0000-0000-0000000FF1CE}\0\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 )
 
C:\>Endlocal
 
C:\>

Open in new window

0
 

Author Comment

by:cwconley
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.

0
 

Author Comment

by:cwconley
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
0
 
LVL 38

Expert Comment

by:Shift-3
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.
0
 

Author Comment

by:cwconley
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.

0
 

Author Comment

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

Author Comment

by:cwconley
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
0
 
LVL 38

Expert Comment

by:Shift-3
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.
0
 

Author Comment

by:cwconley
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.

0
 

Author Comment

by:cwconley
ID: 22825269
hmm still not running as a startup script

How strange. Any other things I should try?

0
 

Author Comment

by:cwconley
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.

0
 

Expert Comment

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

Author Comment

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

Assisted Solution

by:MrHuggybearuk
MrHuggybearuk earned 200 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)
0
 

Author Comment

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

0
 

Author Closing Comment

by:cwconley
ID: 31510743
Thanks For the help.
0

Featured Post

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

764 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