Re: GPO order for software deployment and scripts



I have a very similar situation

My situation is that I need to run a script before MS Office 2003 Software
install and another script after install. Without "Pre" script install
fails.

I have 2 GPOs. One just runs Pre script, and has link order of "2".
Another GPO performs software installation (Office 2003) AND "Post" script
and has link order of "1". I put "Post" script in the same GPO as Software
install because I have learned that Software Installs are processed before
startup scripts.

If everything runs in the order of 1)Pre 2)Install 3)Post then the life is
good. However what ends up happening is that the order is 1)Install 2)Pre
3)Post.

It seems that all of the group policy information is being bunched together
and link order only affects the precedence not the order of execution.

Anthony, your method 1 seems like it could work, but wouldn’t that require a
reboot before the second GPO is applied (the software Install). Are there
any other ways to achieve my goal?

Thanks,

Alexey


"Anthony [MVP]" wrote:

I have not found link order to be very reliable. The two ways I would do
this are:
1) Create a script that looks for a signature file in the old application
and only runs when it finds it, and not if it finds a signature file for the
new application. When the script has executed, at the end it can put the
computer into a security group. Apply the software installation policy to
this security group
2) My preference: create an msi with a custom action to remove the old
application. Put this msi in the software installation policy before the new
application. This uninstall will always run first. Of course, if it is a
custom msi you can already create a custom action to remove the old
application first,
Hope that helps,
Anthony,
http://www.airdesk.com





<cjg.groups@xxxxxxxxx> wrote in message
news:9dfdbbd2-02e8-43fc-9c5d-a6df23bcfaa8@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I was recently advised that GPOs with the highest Link Order (ie: 8)
in GPMC run before GPOs with lower Link Order (ie: 2). I've had some
odd results with this when deploying software using startup scripts
and GPOs.

My software deployment goal is for a startup script to run first and
uninstall an old version of a program, then trigger a reboot (msiexec /
x /qb-! /forcerestart). During the next boot, a software deployment
GPO runs and installs the new version. This order is important
because the versions share components. Uninstalling the old after
installing the new may remove some components of the new version.

I thought the higher Link Order GPOs would run first, so I had the
uninstall script as Link Order 4 and the deployment GPO as Link Order
5. When I restarted the machine, it would show the login screen, then
start the uninstall, then force restart. When it came back, it would
deploy the software before showing the login screen, then let me log
in. Perfect!

But I had the GPO order backwards. To run the uninstall first, it
should have been Link Order 5 and the deployment should have been Link
Order 4. I switched them and got this: At reboot, the new version
installed before the login screen appeared. Then, when "Running
startup scripts" showed on the boot progress window, the uninstall
script started. Before I ever saw the login screen, the restart was
forced. With this scenario, the uninstall may have removed components
which were installed by the deployment moments before.

What complicates this further is software deployment runs before
startup scripts in the Windows startup order. Yet in the top example
above, the script ran first.

Can anyone explain why these two scenarios happened the way they did?
And how can I ensure the scripts run before the deployments? Thanks.


.



Relevant Pages

  • Re: GPO order for software deployment and scripts
    ... I have not found link order to be very reliable. ... Create a script that looks for a signature file in the old application and only runs when it finds it, and not if it finds a signature file for the new application. ... This uninstall will always run first. ... During the next boot, a software deployment ...
    (microsoft.public.windows.group_policy)
  • Automatic Removal and Install
    ... I am trying to remove Office 2003 and install Office 2007 using startup ... REM Environment customization begins here. ... REM Set ConfigFile to the configuration file to be used for deployment REM ... This script works perfectly if run while logged in ...
    (microsoft.public.office.setup)
  • Re: Deploying Office 07 with Group Policy
    ... computer I tested it on took 30 minutes to install. ... the following script to the Computer Startup Script. ... REM Get ProductName from the Office product's core Setup.xml file. ... REM Set ConfigFile to the configuration file to be used for deployment REM ...
    (microsoft.public.office.setup)
  • Re: [opensuse] Editting PATH variable
    ... SuSEconfig script ... ... not knowing what you options you used to install ... If your unfamiliar with Bash a good book is 'Learning the Bash Shell' by ... For Java use editing the PATH variable is NOT required... ...
    (SuSE)
  • Re: KB911280 update problem
    ... Microsoft is working on an amended patch which will address this issue. ... Microsoft advises anyone affected by this to not install the patch and to ... That script is broken by the patch. ... He said he could not write a bug report ...
    (microsoft.public.windowsupdate)