When upgrading an application one challenge can be that the previous version needs to be uninstalled before the new version is installed. Sometimes there could be more than one previous version that must be uninstalled during the upgrade. In this example we have the following requirements for the upgrade:
- If present Java 6.20 update 20 must be uninstalled before installing the new version.
- If present Java 6.20 update 21 must be uninstalled before installing the new version.
- If Java 6.20 update 21 is installed a reboot is required after the uninstallation.
As the example I posted before on how to use a task sequence to install applications with dependencies, a task sequence is the most efficient way to handle this. This assumes that the packages are created already in SCCM and bot install and uninstall programs exist.
- Create a custom task sequence
- Edit the task sequence and add “Install software” steps for all three applications, selecting the uninstall program for the Update 20 and Update 21 applications and the Install program for Update 22.
- On the Java 6 Update 20 step, select the options tab and add the following conditions:
1. An If statement, “None”
2. Select the If statement and add an “Installed Software” condition and browse and open the MSI file for Java 6 Update 20.
- Create a group called Java 6 Update 21, and repeat the condition steps above for that group aswell.
- In the Newly created group add a “Restart Computer” Task. Note! When adding a “restart task sequence step” the task sequence editor by default selects the option “The boot image assigned to this task sequence” this must be changed to “The currently installed default operating system” otherwise the task sequence will fail.
- The task sequence should now look like this and you are ready to advertise it and test it out.
Jörgen,
I wonder: do you distribute the task-sequence in logged-off mode only or also when a user is logged in? It’s not really an issue with something like Java (except you have many business critical applications running on Java) but how do you handle the uninstall/reboot/install scenario for applications that are probably already running and in use 24/7 (like Office, Lotus Notes, SAP etc.)?
Hi,
As you point-out it depends on which kind of application is it. Running an application upgrade when the user i logged of is in my experience less usable because the increasing account of laptops just connecting, hibernating e.t.c
So normally I use a script as a pre-run for the tasksequence which checks if processes are running prompts the user that the application will be upgraded and which application must be closed for the upgrade to succeed. I will try to share that script and experiance of using it aswell.
But of course each application and customer scenario is different..
Regards,
Jörgen
Hi, I am interested to see this script to.
Thnks in advance
I setup this task sequence for a different application and the advertisement is received by the two machines I’m testing against. But that is where it stays. It proceeds past receiving. Any ideas?
Thanks!
Jörgen,
What are the advantages of making a group in the task sequence?
And step 3 says: An If statement, none, but your screenshot says All? Can you clarify?
Thanks in advance 🙂
Martin