SCCM Applications – Introduction, Creation, Firefox Example

Table of Contents
. What are SCCM Applications?
. SCCM Applications and Operating System Deployment (OSD)
. Steps to create SCCM Applications
. Clause Method 1: Setting up Clause with “ProgramFiles” Environment Variable
. Clause Method 2: Setting up two Clauses separately for 32-bit and for 64-bit
. Clause Method 3: Setting up Clause for Version in Registry key
. Continue with Application creation after setting up a Clause

What are SCCM Applications?

Microsoft defines SCCM Applications or Application as a box that “contains one or more sets of installation files for a software package (known as a deployment type), plus instructions on how to deploy the software”. The most common “sets of installation files” will be x86 (32-bit deployment type) and x64 (64-bit deployment type). And the most common instructions are MSI switches and Batch CMD scripts. First, Application uses Detection method to identify if it needs to be installed on a computer. Second, it contacts Management Point in order to download all the files from Distribution Point. Third, choose the Deployment Type that was specified by the rules from the MP and finally install the Application on the client from the folder that was downloaded by the SCCM client on the computer.
In this guide we’ll cover up some basics of the “Application” Creation through Microsoft’s System Center Configuration Manager. Firefox was used as example, but the guide could be applied to any application.

SCCM Applications and Operating System Deployment (OSD)

We’ll cover some of the settings for OSD, though we wouldn’t recommend using Applications in Operating System deployment. In our environment (SCCM CB 1806), there were different problems with Applications in OSD. Main issues were: slow Operating System Deployment and Deployment to “WORKGROUP”.

Slow deployment was because of the ping pong to Management Point to receive the policy. It takes time to use Detection Method to query if the application needs to be installed. Basically, it is new operating system so there is no need for detection method, but it is still used by SCCM because of the nature of the “Applications”. “WORKGROUP” deployment wouldn’t work at all – there was a need for additional settings that weren’t compatible with our environment. So, for OSD it is recommended to use “Packages”. There are no intensive connections to MP and there is no Detection Method needed. Also, Applications for OSD is a new feature that wasn’t available in previous versions of SCCM.

Steps to create SCCM Applications

*** If you need more details on the SCCM Applications Creation process, you can find it in Microsoft Docs.

1. Open SCCM Console
2. Goto => Software Library => Application Management => Applications
3. RightClick "Applications" (or the folder you want to create the application in) => Create Application
    "Specify settings for this application"

*** As of time of this writing, Mozilla uses EXE to install Firefox and not MSI. If it would be MSI, you could select the “(*) Automatically detect information about this application from installation files” and then [Browse] for the MSI. This will fill up most of the information later.

         (*) Manually specify the application information
[Next]
"Specify information about this application"
*** Fill up the info as you want as per Application ***
Name: Mozilla Firefox ESR 60.6.1 x86
Publisher: Mozilla
Software version: 60.6.1
[Next]
"Specify the Configuration Manager Application Catalog entry"
*** Fill up the needed forms if you need ***
[Next]
"Configure deployment types and the priority in which they will be applied for this application"
*** Here we'll add the deployment type itself that will execute the installation of the software
*** If you have several MSI files that you need to install in one pack, you can use either cmd / Powershell / VBScript to install the files, or you can let SCCM handle the file installation, adding several MSI files here at the Deployment Types.
[Add…]
        "Specify settings for this deployment type"
*** If you have an MSI off course choose Type: Windows Installer (*.msi file)", but it is not the case with Firefox
Type: Script Installer
*** "(*) Manually specify the deployment type information" will be selected automatically if you choose "Script Installer"
[Next]
"Specify general information for this deployment type"
Name: Firefox x86 Install
*** This will be the name of the deployment type under the Application itself"
[Next]
"Specify information about the content to be delivered to target devices"
Content location: [Browse]
*** Browse for the folder of the Application setup EXE file
Installation program: [Browse]
*** Browse for the "FirefoxSetup.exe". After you chose the file there will be written:
"FirefoxSetup60.6.1esrX86.exe"
*** Now you need to add the silent switch for the Firefox installation "-ms" so the line will look like this:
Installation program: "FirefoxSetup60.6.1esrX86.exe" –ms
Uninstall program:

*** You may specify the uninstallation program for the software that you install so the user ca uninstall it from the Configuration Manager Client User Interface. In our organization only administrators can uninstall the software, so because of security measures we didn’t use this. If you really want to add the Uninstall program you may use “msiexec /x {GUID} /q” or any uninstallation EXE that comes with your Application.

            [V] Run installation and uninstall program as 32-bit process on 64-bit clients
*** In our environment we installed only 32-bit version of Firefox, so for every application that the installer is 32-bit only you need to check this check box, or your software won't be installed on 64-bit operating system.
[Next]
"Specify how this deployment type is detected"
(*) Configure to detect the presence of this deployment type:
[Add Clause…]

*** Something about Clauses. We’ll cover several methods for Clauses and after that will continue with Application Creation. The first one is the main one: we’ll use 1 Clause with %ProgramFiles% Environment Variable in order to cover both 32-bit and 64-bit installations. The second method will include 2 separate Clauses for 32- and 64-bits installations and the last one will cover Clause configuration through Registry.

Clause Method 1: Setting up Clause with “ProgramFiles” Environment Variable

                Setting Type: File System

*** You can also use “Registry” as Setting Type (this will be covered later), the problem is Firefox writes version number in the registry key, so if the version of Firefox will be higher than the one we’re installing right now, the installation will run and we don’t want to run older version setup mechanism if a higher version is installed. We can configure it through Firefox’s EXE file.

                Type: File
Path: %ProgramFiles%\Mozilla Firefox

*** The problem with file detection method: if the file is located in 32-bit / 64-bit locations like “C:\Program Files” (for 32-bit applications on 32-bit operating systems and 64-bit applications on 64-bit operating systems) and “C:\Program Files (x86)” (for 32-bit applications on 64-bit operating systems) we need to specify both location with “OR” operator and 2 Detection Methods (will be covered later). Specifically, for “Program Files” / “Program Files (x86)” there’s a system environmental variable %ProgramFiles% which converts accordingly to operating system while 32-bit applications are installed.

                File or folder name: firefox.exe
[V] This file or folder is associated with a 32-bit application on 64-bit systems.

*** By default, in 64-bit operating systems SCCM uses “C:\Program Files” and “C:\Windows\system32” for queries, this means if you query 32-bit path like “C:\Program Files (x86)”, the query will fail even if the file exist and SCCM will run the installation sequence. In order to avoid it we need to check this check box. Off course this is only for the “Program Files (x86)” part of the %ProgramFiles% variable.

                (*) The file system setting must satisfy the following rule to indicate the presence of this application
Property: Version
Operator: Greater than or equal to
*** If the version of the firefox.exe installed is the version of the setup we're installing then SCCM won’t run the setup sequence, also if the version is higher / newer it won’t install either. Install only if the version is older than the version stated.
Value: 60.6.1.7020

*** The version should be the exact version of the EXE and not the main build only (like 60.6.1). If the next version that you want to deploy will be like “60.6.1.9020”, only then the deployment will install the new version, and if you state only “60.6.1” for the Detection Method, the newer version “60.6.1.9020” will not be installed.

                [OK]

Clause Method 2: Setting up two Clauses separately for 32-bit and for 64-bit

Taking off exactly before the Clause method 1 began (when we didn’t have any Clauses and after we clicked [Add Clause…] button. If for some reasons that environmental variable is not working for you, you can make 2 Clauses in your Detection Method, one for “C:\Program Files” and one for “C:\Program Files (x86)”.

While in the
"Specify how this deployment is detected"
Section of the "Create Deployment Type Wizard":
(*) Configure to detect the presence of this deployment type:
[Add Clause…]
        Setting Type: File System
Type: File
Path: C:\Program Files (x86)\Mozilla Firefox
File or folder name: firefox.exe
[V] This file or folder is associated with a 32-bit application on 64-bit systems.
(*) The file system setting must satisfy the following rule to indicate the presence of this application
Property: Version
Operator: Greater than or equal to
Value: 60.6.1.7020
[OK]

*** Now add another Clause

    [Add Clause…]
Setting Type: File System
Type: File
Path: C:\Program Files\Mozilla Firefox
File or folder name: firefox.exe
[ ] This file or folder is associated with a 32-bit application on 64-bit systems.
*** Now we don't need to check this
(*) The file system setting must satisfy the following rule to indicate the presence of this application
Property: Version
Operator: Greater than or equal to
Value: 60.6.1.7020
[OK]

*** Now you will see under the connection tab of the second “Clause” there “AND” operator. The “AND” operator is used only if you need both locations existing in the Operating System. “Firefox.exe” can be only in one location, so you need to change the Operator to “OR”.

Clause Method 3: Setting up Clause for Version in Registry key

If you want to make Detection Method by Registry we’ll return to beginning when we don’t have any Clauses.

While in the
"Specify how this deployment is detected"
Section of the "Create Deployment Type Wizard":
(*) Configure to detect the presence of this deployment type:
[Add Clause…]
        Setting Type: Registry
Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Mozilla Firefox 60.6.1 ESR (x86 en-US)
Value: *** Empty ***
[V] This registry key is associated with a 32-bit application on 64-bit systems

*** This check box has similar context as with File paths for 32-bit applications in 64-bit environment. “SOFTWARE\WOW6432Node\Microsoft” is a path for 32-bit applications on 64-bit operating systems and “SOFTWARE\Microsoft” is a path for 64-bit applications on 64-bit systems and is a path for 32-bit applications on 32-bit operating systems. By default 32-bit version of Firefox is installed to “SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Mozilla Firefox 60.6.1 ESR (x86 en-US)”, so if you choose “SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Mozilla Firefox 60.6.1 ESR (x86 en-US)” and check the check box, it will redirect 32-bit applications to install automatically to WOW6432Node.

        Data Type: String
(*) This registry setting must exist on the target system to indicate presence of this application
*** For Firefox this selection is enough, as for each version the registry key is unique as it contains the version in the registry key, so we can check only if the registry key exists, but if you want to check for exact DisplayName registry value, you need to add:
Value: DisplayVersion
*** And set:
Data Type: Version

*** If Data Type Version for Detection Method isn’t working, try using “String” instead. But then you won’t be able to set the Operator for “Greater than or equal to”, so you’re limited to only this version check. Another problem with Firefox that its version is contained inside the registry key, so it is not relevant and it is better to use the File Detection Method.

        Operator: Greater than or equal to
Value: 60.6.1
[OK]

Continue with Application creation after setting up a Clause

            [Next]
"Specify user experience settings for the application"
Installation behavior: Install for system
*** This option will install for "All Users" and "Install for user" will install only for user logged in.
Logon requirement: Whether or not a user is logged on

*** For Firefox it doesn’t matter if the user is logged in or not. The setup process is light and fast. It won’t interrupt and there no need to restart the system in most cases (we didn’t encounter such). For other applications if you don’t want interrupt the user from his work and you know that you might need a restart, then select “Only when no user is logged on”.

            Installation program visibility: Hidden
*** You don't want the user to observe the installation process.
[ ] Allow users to view and interact with the program installation
*** On the contrary If you want a user to interact with the setup process (like CMD input), then select "Normal" visibility and check this checkbox. This works only in Windows and not during OSD.
Maximum allowed run time (minutes): 30
Estimated installation time (minutes): 30
*** There is no need for installation time for Firefox to be more than 30 minutes. It affects only the setup runtime, not downloading content etc. Maybe for other applications you might consider another duration. Remember if you enabled "Allow users to view and interact with the program installation" you will need to extend this time. Maximum allowed is 12 hours (720 minutes)
[Next]
"Specify installation requirements for this deployment type"
*** Here you may add minimum requirements for the computer, like memory, storage…
[Next]
"Specify software dependencies for this deployment type"
*** Here you can add applications (that you created before and they're available in your environment) that your application is dependent on. Firefox doesn't require special dependencies on Windows 10, so we skip this.
[Next]
"Confirm the settings for this deployment type"
[Next]
"The creation of Deployment Type is finished"
[Close]
        [Next]
"Confirm the settings for this application"
[Next]
"The creation of an Application is finished"
[Close]

*** If you used MSI as your “Deployment Type”, then you will need to check its settings.

. RightClick the Application you created => Properties => [Deployment Types] tab
. Select your Deployment Type => [Edit…]
    *** Go through all the tabs check if everything is OK
[Content] tab
Deployment options: Download content from distribution point and run locally
[Detection Method]
*** By default MSI Type uses MSI Product Code with selection of "(*) This MSI product code must exist on the target system to indicate presence of this application". If the exact product code doesn't exist, the application will be installed. You can change the clause selection to
(*) This MSI product code must exist on the target system and the following condition must be met to indicate presence of this application
MSI Property: Version
Operator: Greater then or equal to
Value: *** version of the software that you're installing. So the MSI installer won't operate if current version or greater is installed. ***
[OK]
. [OK]

If you want this application to be installed during Operating System Deployment:

. RightClick the application that you created => Properties
. [General Information] tab
[V] Allow this application to be installed from the Install Application task sequence action without being deployed
[OK]

If for some reason you changed the source files in the folder that is specified in the [Content] tab of the “Deployment Type” of an Application, you need to update the content.

. Goto => Software Library => Application Management => Applications
At the bottom of the screen click [Deployment Types] => RightClick your deployment type => Update Content

After we created an Application, we need to Distribute this Application to our Distribution Points and make sure it got there successfully.

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.