SCCM Applications...even in 2007

BLUF: Yes! I can create an application in SCCM 2007…I just can’t target user collections.

Configuration Manager 2012 Application Model

System Center Configuration Manager 2012 brought a new delivery method for software: Applications.  Applications bring the intelligence of who\what needs the software from the collection to the Application.  The two main differences between Packages and Applications are detection method and requirements (there are others).  There is also the supersedence feature, and that can technically be covered here as well...but I will leave that to you to figure out.

The main feature I will discuss here is the detection method.  I love this!  The Application does a local check on the machine prior to taking an action.  If it detects the software exists already, it takes no install action; and if the deployment type is uninstall, it only takes an action if it does detect it...all dynamically on the local machine not using possibly old data from software\hardware inventory.

How can I do this with Configuration Manager 2007?

Unfortunately I have still had the need to manage SCCM 2007 environments after being spoiled with this new delivery method in SCCM 2012.  One delivery method that I have been using for years came to mind in the interim: Task Sequences.  What, you say: those are for Operating System Delivery. Yes they are, but they can be used for so much more. They can be used for simple things like initiating a Software Updates cycle with an Install Software Updates task, or they can be used for small or complex application installs that may require a controlled restart between actions: something that packages do not handle well.

--On a quick aside, task sequences are also good for installing applications that include large data source size, as they automatically delete the content on completion.

Conditions

What task sequences bring to the table are conditions (on the Options tab of every task).  These can be set to many things, but the important options for this scenario are file or folder information, registry settings, or even WMI.  These conditions, like Applications, are verified locally on the machines prior to running the specified task.  These conditions allow you to put the intelligence in the Task Sequence instead of in the collection.

--Applications bring the option to deploy to All Workstations; using this type of application deployment does the same as no action will take place unless the condition is true.

Install Example

For the installation of an application, one way (one of many ways) to check to see if an application with a specific version exists is to look at file properties.  To show an example of how to check for two different criteria, we will look for the existence of an x86 version of Java on both x86 or x64 bit operating systems – since the uninstall string should be the same for both.  To do this we need to use an If statement and select Any condition.  At this point, now we select a file condition and browse to both %ProgramFiles% and %ProgramFiles(x86)% and to Java\bin\java.exe, separately.  After selecting each file, we then have the option to only check for its existence, to check for a specific version, or other attributes of the file.  In this case, we want to check for version, as we are getting ready to install a specific version and don’t want to take any action if the application is already installed.  We do this for both file locations.

Uninstall Example

When I uninstall an MSI based application, I generally use the syntax msiexec.exe /x <ProductID> /qn.  So how do I know this command string (uninstall action) is required to be called?  In an Application, I would point straight at the MSI and it detects the ProductID for me.  In 2007, to detect the existence of the application prior to trying to uninstall it, I look for it in the registry:

HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\<ProductID> or

HKLM\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\<ProductID>

With this information, you can now use the registry condition to verify the software’s existence prior to uninstalling it.  In this case we can just look for the existence of the registry key prior to taking action.

Summary

This methodology is great for applications that have dependencies or ones that do not uninstall older versions of their software prior to installation of the current version: say Java for instance!  Some people write complex scripts to uninstall older versions, where we can use Queries to find out what versions are installed on our networks, and create a task for each version: see my article on SCCM 2012 Uninstall Applications for more pointers on this.

As I mentioned in my BLUF (which means bottom line up front, btw), the one downside of this method of application delivery is that you cannot target user collections.  Since the feature was created for Operating System Deployment (a computer task), Microsoft did not provide the option to deploy (advertise) Task Sequences to users.  This downside is pretty minor though...

As always....enjoy and keep on automating!!!

Comments

  • Anonymous
    January 01, 2003
    thanks
  • Anonymous
    December 18, 2014
    Great article. Task Sequences have become my best asset in SCCM 2007.