Bit of scripting help

Associate
Joined
4 Mar 2010
Posts
1,304
Hey all, Am using a script to roll out Office 2010. Have a slight issue with it in that the GPO executes the script and works fine, but the script runs in the background and the users are able to log on and will inevitably start trying to open office (outlook)

Is there a simple way to stop the computer going to the Ctrlaldelete screen until the install/script has finished?

Thanks
 
Hey all, Am using a script to roll out Office 2010. Have a slight issue with it in that the GPO executes the script and works fine, but the script runs in the background and the users are able to log on and will inevitably start trying to open office (outlook)

Is there a simple way to stop the computer going to the Ctrlaldelete screen until the install/script has finished?

Thanks

If you set it as an "assigned" deployment (computer targetted GPO) it should run and install before allowing the user to log on.
 
Have you thought about setting this as a shutdown script? Less waiting time in the morning is always appreciated and will get around the issue. If not:

Try enabling "Run logon scripts synchronously" in Computer -> Administrative templates -> system -> scripts. I'd audit the current GPOs to ensure this isn't already set, or set to asynchronous.

A bit more about running synchronously:

Directs the system to wait for the logon scripts to finish running before it starts the Windows Explorer interface program and creates the desktop.

If you enable this setting, Windows Explorer does not start until the logon scripts have finished running. This setting ensures that logon script processing is complete before the user starts working, but it can delay the appearance of the desktop.

If you disable this setting or do not configure it, the logon scripts and Windows Explorer are not synchronized and can run simultaneously.

This setting appears in the Computer Configuration and User Configuration folders. The setting set in Computer Configuration takes precedence over the setting set in User Configuration.

What does your script look like?
 
Last edited:
it was going to be a start up script as nobody here turns their machines off at night.

As the script is a computer start up script I would not have thought the logon script settings would affect it?

The script is taken from microsoft in their article about rolling out office through gpo start up scripts, as below

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=\\FS\Office2010SourceFiles

REM Set ConfigFile to the configuration file to be used for deployment (required)
set ConfigFile=\\FS\Office2010SourceFiles\ProPlus.WW\config.xml

REM Set LogLocation to a central directory to collect log files.
set LogLocation=\\FS\Office2010LogFiles

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

As i mentioned it works fine but it runs in the background which is no good as it will fail if people have any office applications automatically open when logging on etc
 
Back
Top Bottom