+ Post New Thread
Results 1 to 14 of 14
Windows 7 Thread, office 2010 deploy script won't run? in Technical; Using these instructions: Use Group Policy Software Installation to deploy the 2007 Office system I can't get the script to ...
  1. #1
    chazzy2501's Avatar
    Join Date
    Jan 2008
    Location
    South West
    Posts
    1,801
    Thank Post
    215
    Thanked 265 Times in 215 Posts
    Rep Power
    68

    office 2010 deploy script won't run?

    Using these instructions: Use Group Policy Software Installation to deploy the 2007 Office system

    I can't get the script to run at windows startup on my Windows 7 PRO. If I run the script directly on the machine it fails and errors (error code 1) and puts a log entry in the officelogfiles. I'm assuming the script fails as it was designed to run at startup. I may have to work on the script to make the install work but my issue for the moment is that it doesn't appear that windows runs the script at all during startup as the program isn't installed and no error is recorded in the officelogsfiles.

    I also can't find an event entry stating whats going on?

    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 "office14." as a prefix. 
    set ProductName=Office14.PROPLUS
    
    REM Set DeployServer to a network-accessible location containing the Office source files.
    set DeployServer="\\spserver\distribution point\office2010"
    
    REM Set ConfigFile to the configuration file to be used for deployment (required)
    set ConfigFile="\\spserver\distribution point\office2010\ProPlus.WW\config.xml"
    
    REM Set LogLocation to a central directory to collect log files.
    set LogLocation="\\spserver\distribution point\office2010\officelogfiles"
    
    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 2010 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

  2. #2

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,698
    Thank Post
    335
    Thanked 516 Times in 484 Posts
    Rep Power
    180
    Unless I'm missing something, It's working as it's asked to It's only told to post an error log when it works, because :End as such has no logging in it....

    Code:
    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
    As above, If product not found (aka it needs to install), Run install + Log
    If found or "other error" Do nothing.

    Simple way to test it, is add an:

    Code:
    echo %date% %time% Script went to End!!! >> %LogLocation%\%computername%.txt
    into this part so it's like:
    Code:
    REM If 0 or other was returned, the product was found or another error occurred. Do nothing.
    :End
    echo %date% %time% Script went to End!!! >> %LogLocation%\%computername%.txt
    Rerun it, and see if its running the script just failing somewhere else, or what. If the line is printed it's failing on one of the earlier checks, but currently you have no way of knowing if it runs and just errors/found product, or if it's not running at all.


    *Edit - As a stupid question, what filetype did you save this "script" as?

    Steve
    Last edited by Steve21; 27th September 2011 at 12:16 PM.

  3. #3
    chazzy2501's Avatar
    Join Date
    Jan 2008
    Location
    South West
    Posts
    1,801
    Thank Post
    215
    Thanked 265 Times in 215 Posts
    Rep Power
    68
    the script was saved as a BAT file, but just for testing I also tried cmd. As I know the script fails as office is not installed, so I'm expecting an error. I've told the script to run interactivley and with the logo but this does not happen. I added the script into the group policy. view file drag and drop. blah blah. I also tried pointing to the script directly from the distribution point. All my msi's install from my distribution point but perhaps I need different security settings on the share to allow the machine only to access the script?

  4. #4

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,698
    Thank Post
    335
    Thanked 516 Times in 484 Posts
    Rep Power
    180
    Code:
    As I know the script fails as office is not installed, so I'm expecting an error
    (Not sure if I'm misunderstanding what you're thinking, or if you're getting the logic backwards)

    It's checking if there's an uninstall regkey (aka installed), and if it is installed it'll break out. No error logged (in your version). Just goes straight to :End.
    If it's not installed, it should run into the install. If it errors on install, it'll return the log message.

    aka, If as you mentioned it's not putting any error in log files, or installing program, it may well not be failing, just going to End as it thinks it's installed. Kind of hard to know without adding the debug line I mentioned above. If you add that to the BAT, and restart the pc it should add "something" to the log file, either that it went to End, or your normal debug line. If neither add we'll see from there.

    Sorry if that makes little sense, (Waffled )
    Steve

  5. #5
    chazzy2501's Avatar
    Join Date
    Jan 2008
    Location
    South West
    Posts
    1,801
    Thank Post
    215
    Thanked 265 Times in 215 Posts
    Rep Power
    68
    ok, i added that line to the end of the script (but before the endlocal) reset the vm and nothing, no log file.

    how do i find out what windows 7 is doing when it runs (or does not run) this script.

  6. #6


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    6,647
    Thank Post
    229
    Thanked 865 Times in 743 Posts
    Rep Power
    297
    what happens if you run it manually?

    might be worth trying that and adding lots of pause statements see if you can see where its escaping

  7. Thanks to sted from:

    chazzy2501 (27th September 2011)

  8. #7
    chazzy2501's Avatar
    Join Date
    Jan 2008
    Location
    South West
    Posts
    1,801
    Thank Post
    215
    Thanked 265 Times in 215 Posts
    Rep Power
    68
    OK. I get "27/09/2011 15:08:24.89 Setup ended with error code 1." in the log file. foo

    I wrapped quotes around the distribution point path because of the spaces. It doesn't like the spaces. I've move the source files and redone the script. Still testing.
    Last edited by chazzy2501; 27th September 2011 at 03:59 PM.

  9. #8
    chazzy2501's Avatar
    Join Date
    Jan 2008
    Location
    South West
    Posts
    1,801
    Thank Post
    215
    Thanked 265 Times in 215 Posts
    Rep Power
    68
    OK, the script really doesn't want spaces. I've move the source files & redone the script. If I run the script now it prompts UAC. I deny it and I get the error code 5. This is great as I've now fixed the script but can still not get it to run automatically.

    EDIT: OK the script runs! It installed office hoorah! Now office is asking for activation I did use the autoactivation command maybe I missed something? anyhow using VAMT 2.0 should be ok.
    Last edited by chazzy2501; 27th September 2011 at 04:36 PM.

  10. #9
    phughes's Avatar
    Join Date
    Oct 2007
    Location
    Burnley
    Posts
    77
    Thank Post
    11
    Thanked 4 Times in 2 Posts
    Rep Power
    15
    Did you manage to get the installation to automate as a startup script?

    Did you experience the issue of the installation running in the background and letting users log on before the installation had finished?

  11. #10
    phughes's Avatar
    Join Date
    Oct 2007
    Location
    Burnley
    Posts
    77
    Thank Post
    11
    Thanked 4 Times in 2 Posts
    Rep Power
    15
    I'm in the middle of testing Windows 7 deployment, but i did get the activation running automatically on XP. See this thread Office 2010 Netowrk Install

  12. #11
    chazzy2501's Avatar
    Join Date
    Jan 2008
    Location
    South West
    Posts
    1,801
    Thank Post
    215
    Thanked 265 Times in 215 Posts
    Rep Power
    68
    Yes, it does let my users login before it finishes. Its a small issue though, I've decided to not have it activate automatically that way I can keep track of them through VAMT.

  13. #12
    phughes's Avatar
    Join Date
    Oct 2007
    Location
    Burnley
    Posts
    77
    Thank Post
    11
    Thanked 4 Times in 2 Posts
    Rep Power
    15
    Ok.

    There is a switch that you can do apparently, you do a start /wait \\server\share\setup.exe /adminfile \\server\share\config.mst.

    But i can't get it to wait. It just does the same.

  14. #13
    gshaw's Avatar
    Join Date
    Sep 2007
    Location
    Essex
    Posts
    2,662
    Thank Post
    166
    Thanked 220 Times in 203 Posts
    Rep Power
    67
    Quote Originally Posted by phughes View Post
    Did you manage to get the installation to automate as a startup script?

    Did you experience the issue of the installation running in the background and letting users log on before the installation had finished?
    Also note if uninstalling Office 2007 it does a reboot halfway through unless you add an extra suppress switch in the customisation wizard...

    Even when testing with SCCM it's not foolproof at stopping users running Office before \ during the installation... can't understand why the deployment methods don't have some way of locking a PC to users when installing major suites like Office...

  15. #14


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    6,647
    Thank Post
    229
    Thanked 865 Times in 743 Posts
    Rep Power
    297
    Quote Originally Posted by gshaw View Post
    Also note if uninstalling Office 2007 it does a reboot halfway through unless you add an extra suppress switch in the customisation wizard...

    Even when testing with SCCM it's not foolproof at stopping users running Office before \ during the installation... can't understand why the deployment methods don't have some way of locking a PC to users when installing major suites like Office...
    I cant understand why they changed methods from office 2003 which was great for deployment to the pita thats 07/10

  16. Thanks to sted from:

    gshaw (13th February 2012)

SHARE:
+ Post New Thread

Similar Threads

  1. Office 2010 Script to change Default File Location
    By talksr in forum Office Software
    Replies: 9
    Last Post: 11th March 2013, 03:03 PM
  2. [MS Office - 2010] Deploy Office 2010 - Startup Script
    By adamchapman in forum Office Software
    Replies: 8
    Last Post: 4th August 2011, 12:16 AM
  3. Group Policy - Deploy Office 2010
    By Ben-BSH in forum Office Software
    Replies: 7
    Last Post: 21st June 2011, 03:50 PM
  4. Replies: 0
    Last Post: 4th February 2011, 12:21 PM
  5. [MS Office - 2010] Remove Office 2010 first run message
    By zag in forum Office Software
    Replies: 1
    Last Post: 24th September 2010, 11:25 AM

Thread Information

Users Browsing this Thread

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

Posting Permissions

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