none
GPO startup script not working

    Question

  • Hi,

    I have 2 scripts i run as startup script:

    First script to install MS access

    if exist "C:\Program Files (x86)\Microsoft Office\Office14\MSACCESS.EXE" ( goto exit ) else ( goto install )
    
    :install
    \\dc1.fulldomainname\NETINSTALL\Access_2010_en_US\setup.exe
    
    :exit
    exit

    Second script to install MS office

    setlocal
    
    REM *********************************************************************
    REM Environment customization begins here. Modify variables below.
    REM *********************************************************************
    
    REM Get ProductName from the Office products core Setup.xml file, and then add "office14." as a prefix. 
    set ProductName=Office14.Standard
    
    REM Set DeployServer to a network-accessible location containing the Office source files.
    set DeployServer=\\dc1.fulldomainname\NETINSTALL\Office_2010_en_US
    
    REM Set ConfigFile to the configuration file to be used for deployment (required)
    set ConfigFile=\\dc1.fulldomainname\NETINSTALL\Office_2010_en_US\Standard.WW\config.xml
    
    REM Set LogLocation to a central directory to collect log files.
    set LogLocation=\\dc1.fulldomainname\NETINSTALL\Office_2010_en_US\LogFiles
    
    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

    For some strange reason the first script is running and MS access is installed on the PC,

    The 2nd script isn't running anymore. it did this before. not sure how long it hasn't been running since we are not installing new systems every day.

    Both scripts are in the same GPO.

    I tried putting them in a seperate GPO -> not working

    If i run the script by hand it installs perfectly -> i can assume the script is working?

    I tried changing the order in what the scripts are run -> no result

    Maby there is anyone who can point me in the right direction.

    Thanks


    • Edited by Thijscream Wednesday, October 14, 2015 9:55 AM
    Wednesday, October 14, 2015 9:55 AM

Answers

All replies

  • In the second script, do you have any text files generated in the LogLocation folder?

    Check that the config.xml file is valid.

    Check that the share and NTFS permissions on the software share have 'Authenticated Users' and/or 'Domain Computers' with read (or write too in your case).

    Wednesday, October 14, 2015 3:42 PM
  • Thanks for the reply, 

    If i run the 2nd script manualy it works like it should work, i think i can assume there isn't a problem with the script.

    the XML file is the following:

    <Configuration Product="Standard">
                    <AddLanguage ShellTransform="yes" Id="en-us"/>
                    <AddLanguage Id="nl-nl"/>
     
                    <!-- <Display Level="none" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes" /> -->
                   
                    <!-- <Logging Type="standard" Path="%temp%" Template="Microsoft Office Standard Setup(*).txt" /> -->
     
                    <!-- <USERNAME Value="Customer" /> -->
                   
                    <!-- <COMPANYNAME Value="Company name" /> -->
                   
                    <!-- <INSTALLLOCATION Value="%programfiles%\Microsoft Office" /> -->
                   
                    <!-- <LIS CACHEACTION="CacheOnly" /> -->
                   
                    <!-- <LIS SOURCELIST="\\server1\share\Office;\\server2\share\Office" /> -->
                   
                    <!-- <DistributionPoint Location="\\server\share\Office" /> -->
                   
                    <!-- <OptionState Id="OptionID" State="absent" Children="force" /> -->
                   
                    <!-- <Setting Id="SETUP_REBOOT" Value="IfNeeded" /> -->
                   
                    <!-- <Command Path="%windir%\system32\msiexec.exe" Args="/i \\server\share\my.msi" QuietArg="/q" ChainPosition="after" Execute="install" /> -->
     
    </Configuration>

    If i look at this file i see almost everything commented out and only add dutch language.

     the share has "all users" as read permissions. permissions on both folders are the same.( access and office folders)

    i adjusted the write permissions on the log folder, see what result this gives

    • Edited by Thijscream Thursday, October 15, 2015 6:15 AM forgot a line
    Thursday, October 15, 2015 5:57 AM
  • > The 2nd script isn't running anymore. it did this before. not sure how
    > long it hasn't been running since we are not installing new systems
    > every day.
     
    1. Just to make sure: Elevated commandline, run "gpresult /h report.html
    & report.html". Is the script listed here as applied?
     
    2. Check if http://gpsearch.azurewebsites.net/#2308 is enabled. This
    will cause your scripts to run concurrently - and as we all know, only
    one setup can run at a time.
     
    3. Add some more logging to your script - at least a "started on %date%
    %time%>%Logfile".
     

    Greetings/Grüße, Martin

    Mal ein gutes Buch über GPOs lesen?
    Good or bad GPOs? - my blog…
    And if IT bothers me - coke bottle design refreshment (-:
    Thursday, October 15, 2015 8:12 AM
  • 1. script is listed in gpresult

    2. tried both, currently enabled.

    3. will change the script. but nothing is writen to the log location and yes there is write permission.

    script is running

    i see:

    setup.exe * 32  SYSTEM 00 4.764K  Microsoft Setup Bootstrapper

    but i don't see any progress

    after more then 30 mins there still isn;t any office installed

    pc specs -> dual core, ssd, 4gb memory, 1gb network, windows 7 pro. (should be fast enough to install it within 30 mins)

    also no logs are written


    • Edited by Thijscream Friday, October 16, 2015 12:49 PM
    Friday, October 16, 2015 12:40 PM
  • > setup.exe * 32  SYSTEM 00 4.764K  Microsoft Setup Bootstrapper
     
    Then we can almost safely assume that setup.exe has a question (opened a
    confirmation windows) nobody can answer...
     

    Greetings/Grüße, Martin

    Mal ein gutes Buch über GPOs lesen?
    Good or bad GPOs? - my blog…
    And if IT bothers me - coke bottle design refreshment (-:
    Friday, October 16, 2015 2:58 PM
  • Your config.xml file is empty and needs to be populated so that the setup runs quietly. Uncomment the lines which you need

    <Display Level="none" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes" />
                   

    See here for more info.

    Saturday, October 17, 2015 8:02 PM
  • thanks so much!

    this worked.

    finaly got it working.

    Monday, October 19, 2015 6:21 AM
  • No probs, glad it is working. :)
    Monday, October 19, 2015 11:43 AM