+ Post New Thread
Results 1 to 10 of 10
Office Software Thread, Office 2013 install startup script wanted in Technical; Does anyone have a startup batch file to install Office 2013? There was one (on Technet I think) for installing ...
  1. #1
    OverWorked's Avatar
    Join Date
    Jul 2005
    Location
    N. Yorks
    Posts
    1,013
    Thank Post
    198
    Thanked 42 Times in 34 Posts
    Rep Power
    30

    Office 2013 install startup script wanted

    Does anyone have a startup batch file to install Office 2013?

    There was one (on Technet I think) for installing Office 2010 - I'll try just modifying that.

    The official Deployment Guide for Office 2013 just tells you to write your own script. How hard would it have been to put an example in?

    As far as I can see, it's the same process as for Office 2010: copy to administrative share, use the OCT to create MSP file in the /updates folder, use startup script to deploy. Except MS don't provide the script.

  2. #2

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,846
    Thank Post
    877
    Thanked 1,680 Times in 1,460 Posts
    Blog Entries
    12
    Rep Power
    444

  3. #3
    OverWorked's Avatar
    Join Date
    Jul 2005
    Location
    N. Yorks
    Posts
    1,013
    Thank Post
    198
    Thanked 42 Times in 34 Posts
    Rep Power
    30
    Thanks FN-GM, but I'd already seen that.

    I tweaked the Office 2010 .bat file below.

    The process for deploying Office 2013 is largely the same as 2010.

    Unpack the .iso to an administrative share (the path and name must not contain spaces)

    Run setup.exe /admin to run the OCT and create a .MSP file for silent install. Copy this file to the \updates\ folder.

    Run the script, either manually or as a GPO startup script.

    Code:
    setlocal
    
    REM *********************************************************************
    REM Environment customization begins here. Modify variables below.
    REM *********************************************************************
    
    REM Get ProductName from the Office product's core Setup.xml file, and then add "office15." as a prefix. 
    set ProductName=Office15.PROPLUS
    
    REM Set DeployServer to a network-accessible location containing the Office source files.
    set DeployServer=\\server\share\MS_Office_Professional_Plus_2013_32Bit
    
    REM Set ConfigFile to the configuration file to be used for deployment (required)
    set ConfigFile=\\server\share\MS_Office_Professional_Plus_2013_32Bit\ProPlus.WW\config.xml
    
    REM Set LogLocation to a central directory to collect log files.
    set LogLocation=\\server\share\MS_Office_Professional_Plus_2013_32Bit\Office2013LogFiles
    
    REM *********************************************************************
    REM Deployment code begins here. Do not modify anything below this line.
    REM *********************************************************************
    
    IF NOT "%ProgramFiles(x86)%"=="" (goto ARP64) else (goto ARP86)
    
    REM Operating system is X64. Check for 32 bit Office in emulated Wow6432 uninstall key
    :ARP64
    reg query HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%
    if NOT %errorlevel%==1 (goto End)
    
    REM Check for 32 and 64 bit versions of Office 2013 in regular uninstall key.(Office 64bit would also appear here on a 64bit OS) 
    :ARP86
    reg query HKEY_LOCAL_MACHINE\SOFTWARE\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

  4. 2 Thanks to OverWorked:

    SimonWindisch (4th October 2013), StevieM (16th September 2013)

  5. #4

    Join Date
    Mar 2013
    Location
    Santa Barbara
    Posts
    1
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    I've tried to use this script and other batch scripts to run the Office 2013 setup.exe via group policy - but it never actually initiates the installation. I can run the script when logged on as a administrative user - but the script will not run during the startup process.

    When I perform an rsop.msc - I see that the script was executed. The install just doesn't kick off.

    Not sure what I am missing. I've never had a problem deploying .msi packaged software.

    I can look at the event logs and see that the computer I am testing is receiving the group policies,

    Quote Originally Posted by OverWorked View Post
    Thanks FN-GM, but I'd already seen that.

    I tweaked the Office 2010 .bat file below.

    The process for deploying Office 2013 is largely the same as 2010.

    Unpack the .iso to an administrative share (the path and name must not contain spaces)

    Run setup.exe /admin to run the OCT and create a .MSP file for silent install. Copy this file to the \updates\ folder.

    Run the script, either manually or as a GPO startup script.

    Code:
    setlocal
    
    REM *********************************************************************
    REM Environment customization begins here. Modify variables below.
    REM *********************************************************************
    
    REM Get ProductName from the Office product's core Setup.xml file, and then add "office15." as a prefix. 
    set ProductName=Office15.PROPLUS
    
    REM Set DeployServer to a network-accessible location containing the Office source files.
    set DeployServer=\\server\share\MS_Office_Professional_Plus_2013_32Bit
    
    REM Set ConfigFile to the configuration file to be used for deployment (required)
    set ConfigFile=\\server\share\MS_Office_Professional_Plus_2013_32Bit\ProPlus.WW\config.xml
    
    REM Set LogLocation to a central directory to collect log files.
    set LogLocation=\\server\share\MS_Office_Professional_Plus_2013_32Bit\Office2013LogFiles
    
    REM *********************************************************************
    REM Deployment code begins here. Do not modify anything below this line.
    REM *********************************************************************
    
    IF NOT "%ProgramFiles(x86)%"=="" (goto ARP64) else (goto ARP86)
    
    REM Operating system is X64. Check for 32 bit Office in emulated Wow6432 uninstall key
    :ARP64
    reg query HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%
    if NOT %errorlevel%==1 (goto End)
    
    REM Check for 32 and 64 bit versions of Office 2013 in regular uninstall key.(Office 64bit would also appear here on a 64bit OS) 
    :ARP86
    reg query HKEY_LOCAL_MACHINE\SOFTWARE\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

  6. #5

    Join Date
    Jun 2013
    Posts
    1
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Is it possible to modify this batch script to display the computername. These logs files build up and its hard to determine which computer is getting the install.

    Thanks,

  7. #6
    OverWorked's Avatar
    Join Date
    Jul 2005
    Location
    N. Yorks
    Posts
    1,013
    Thank Post
    198
    Thanked 42 Times in 34 Posts
    Rep Power
    30
    @skay: I don't know why it wouldn't run the installation whebn started from a startup script. If you've used the OCT to set it to do a silent installation there won't be any indication that it's running. Have you logged on and opened task manager for all users? There should be setup.exe or TrustedInstaller running.

    The install can take 10-20 minutes.

    @fch7227: if you're running it manually, you could add
    Code:
    echo %computername%
    to it. If it's running as a startup script, then you won't see anything.

    I also add
    Code:
    wuauclt /detectnow
    to the end of it to speed up detecting updates from WSUS.

  8. #7

    Join Date
    Jun 2013
    Posts
    1
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Thanks Overworked, I used your script as a starting point for Office365 setup and ended up with this:

    Code:
    setlocal
    
    REM *********************************************************************
    REM Environment customization begins here. Modify variables below.
    REM *********************************************************************
     
    REM Get ProductName  
    set "ProductName=O365ProPlusRetail - en-us"
     
    REM Set DeployServer to a network-accessible location containing the Office source files.
    set DeployServer=\\*******\*****\*****\office15
     
    REM Set ConfigFile to the configuration file to be used for deployment (required)
    set ConfigFile=\\*******\*****\*****\office15\installconfiguration.xml
     
    REM Set LogLocation to a central directory to collect log files.
    set LogLocation=\\*******\*****\*****\office15\InstallLogFiles
     
     
    REM *********************************************************************
    REM Deployment code begins here. Do not modify anything below this line.
    REM *********************************************************************
     
    IF NOT "%ProgramFiles(x86)%"=="" (goto ARP64) else (goto ARP86)
     
    REM Operating system is X64. Check for 32 bit Office in emulated Wow6432 uninstall key
    :ARP64
    reg query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%"
    if NOT %errorlevel%==1 (goto End)
     
    REM Check for 32 and 64 bit versions of Office 2013 in regular uninstall key.(Office 64bit would also appear here on a 64bit OS) 
    :ARP86
    reg query "HKEY_LOCAL_MACHINE\SOFTWARE\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
    echo %date% %time% Deployment triggered on %computername%.>> %LogLocation%\%computername%.txt
    start /wait %DeployServer%\setup.exe /configure %ConfigFile%
    echo %date% %time% Setup executed and 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
    Some observations from my testing and hair pulling:

    1. The registry key created has spaces in the name (thanks MS), so the quotes are needed to get the check to work

    2. The Office 365 setup switch is /configure - not /config (ditto)

    3. It really does deploy silently. The first time I did it I thought nothing had happened and went away for 20 mins, only to find it in the start menu of the test system when I got back.

    4. This will install alongside Office 2010 painlessly. Unfortunately it doesn't uninstall nicely (the uninstall message even recommends running Office 2010 repair!). You will have to repair 2010 if you uninstall 365/2013, and you may need to reactivate the 2010 installation as well.

    5. Installation was approx 12 mins on a Win 7 test laptop.

    It would have been nice if MS had put a suitable script in with the deployment instructions!

    Regards all.

  9. Thanks to EasyBob from:

    SimonWindisch (4th October 2013)

  10. #8
    OverWorked's Avatar
    Join Date
    Jul 2005
    Location
    N. Yorks
    Posts
    1,013
    Thank Post
    198
    Thanked 42 Times in 34 Posts
    Rep Power
    30
    Quote Originally Posted by EasyBob View Post
    Thanks Overworked, I used your script as a starting point for Office365 setup and ended up with this:

    Some observations from my testing and hair pulling:

    1. The registry key created has spaces in the name (thanks MS), so the quotes are needed to get the check to work

    2. The Office 365 setup switch is /configure - not /config (ditto)

    3. It really does deploy silently. The first time I did it I thought nothing had happened and went away for 20 mins, only to find it in the start menu of the test system when I got back.

    4. This will install alongside Office 2010 painlessly. Unfortunately it doesn't uninstall nicely (the uninstall message even recommends running Office 2010 repair!). You will have to repair 2010 if you uninstall 365/2013, and you may need to reactivate the 2010 installation as well.

    5. Installation was approx 12 mins on a Win 7 test laptop.

    It would have been nice if MS had put a suitable script in with the deployment instructions!

    Regards all.
    Glad it's working. I didn't write the script - I found it somewhere else (I can't remember - Technet probably).

    1. Also the file paths must not have spaces in them and putting quotes around them doesn't work. You may have to create a share with no spaces in it's path.

    3. Got me confused for a while. I sometimes open Resource Monitor so I can see from a distance when it's finished and gone quiet. Or look in the log files folder.

    4. It depends on the options created in the Office Customisation Tool. I set mine to uninstall previous versions, but sometimes it leaves traces of Office 2010 with differing effects.

  11. #9

    Join Date
    Feb 2011
    Posts
    91
    Thank Post
    6
    Thanked 24 Times in 15 Posts
    Rep Power
    12
    I have been doing this over the summer. Its certainly slow going ... anyway heres an article that may help people roll out office 2013. Explains the process of what to do to get a silent install on Office 2013 including editing the config.xml file and includes some of the error codes you might get. Hope its useful.

  12. #10
    StevieM's Avatar
    Join Date
    Apr 2013
    Location
    Liverpool
    Posts
    827
    Thank Post
    328
    Thanked 357 Times in 238 Posts
    Rep Power
    83
    Thanks OverWorked

    I used the script to automate an install of Office 2013 to a test machine last week and it worked perfectly. It even allows a user to log in while it is installing. (I had visions of teachers and pupils switching on their machines and having to wait while the software installed!) At this very moment it is installing in one of our ICT suites. Now all I have to do is wait for the backlash from staff as they try to figure out how to use it!

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 2
    Last Post: 18th October 2012, 05:59 PM
  2. Replies: 0
    Last Post: 2nd February 2012, 12:20 PM
  3. [MS Office - 2010] Deploy Office 2010 - Startup Script
    By adamchapman in forum Office Software
    Replies: 8
    Last Post: 4th August 2011, 12:16 AM
  4. Replies: 8
    Last Post: 23rd September 2008, 03:46 PM
  5. Installing GoogleSketchup 6 via startup script
    By markwilliamson2001 in forum Windows
    Replies: 3
    Last Post: 4th March 2008, 07:26 PM

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •