Re: GPO order for software deployment and scripts
- From: Alexey Kozik <Alexey Kozik@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 5 Jun 2009 10:09:01 -0700
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.
- Follow-Ups:
- Re: GPO order for software deployment and scripts
- From: Anthony [MVP]
- Re: GPO order for software deployment and scripts
- Prev by Date: Re: How to add trusted sites in IE 7 using GPO
- Next by Date: Re: How to add trusted sites in IE 7 using GPO
- Previous by thread: Re: How to set theme for new users?
- Next by thread: Re: GPO order for software deployment and scripts
- Index(es):
Relevant Pages
|