You are browsing the archive for CM12 R2.

Installing a windows feature using the application model

6:18 pm in CM12, CM12 R2, ConfigMgr, SCCM by Kurt Depre

Hi All,

Recently I had the requirement to install IIS + some features on Windows 7 machines using the application model. After some searching this was fairly easy to accomplish using Dism and a script detection method. Let’s do this step by step.

1. Create a new Application and select “Manually specify the application information”

clip_image002

2. Fill out the application information and application catalog metadata pages and click next to go to the Deployment types page.

clip_image004

clip_image006

3. Click Add on the deployment type page to create a new DT.

clip_image008

4. Select “Script Installer” and “Manually specify the deployment type Information” and click next

clip_image010

5. Give your Deployment type a name and click next.

clip_image012

6. Leave content location empty and set the following as installation program (depends on the feature you want to install, to find a list with windows features you can use the following command: Dism.exe /Online /Get-features):

DISM.exe /Online /Enable-Feature /FeatureName: <NameOftheFeatureToEnable>

In my example it will be the following:

DISM.exe /Online /Enable-Feature /FeatureName:IIS-ASP /FeatureName:IIS-ASPNET /FeatureName:IIS-BasicAuthentication /FeatureName:IIS-WindowsAuthentication /FeatureName:IIS-NetFxExtensibility /FeatureName:IIS-ISAPIExtensions /FeatureName:IIS-ISAPIFilter /FeatureName:IIS-RequestFiltering /FeatureName:IIS-StaticContent /FeatureName:IIS-ManagementConsole /FeatureName:IIS-WebServer /FeatureName:IIS-WebServerRole /FeatureName:IIS-CommonHttpFeatures /FeatureName:IIS-DefaultDocument /FeatureName:IIS-DirectoryBrowsing /FeatureName:IIS-HttpErrors /FeatureName:IIS-HttpLogging /FeatureName:IIS-HttpRedirect

clip_image014

7. On the detection method page select “Use a custom script to detect the presence of this deployment type” and click edit to add the script

clip_image016

8. Select PowerShell and paste a script similar to mine (change or remove feature names to detect to match your scenario).

You can download the example script here : FeatureDetection.zip

clip_image018

9. Configure the User Experience, Requirements (maybe limit the OS here) and Dependency settings to match you scenario.

10. Click next a few time to confirm the creation of the Deployment type and the application

11. Deploy and test.

Till next time

Kurt

PS: If anyone has a better script to perform the detection feel free to share it

The Application Model in the real world: Supersedence.

3:27 pm in CM12, CM12 R2, ConfigMgr, SCCM by Kurt Depre

Hi all,

As you will see in my future posts, I’m a big fan of the application model in ConfigMgr 2012. The AppModel offers several interesting features to deploy your applications to your clients. In this blog post I want to cover 2 scenarios enabled by one specific feature of the application model: Supersedence

What is supersedence?

TechNet describes it as follows: Application management in Microsoft System Center 2012 Configuration Manager allows you to upgrade or replace existing applications by using a supersedence relationship. When you supersede an application, you can specify a new deployment type to replace the deployment type of the superseded application and also configure whether to upgrade or uninstall the superseded application before the superseding application is installed.

Supersedence can be very useful when you have an application that replaces an older version or another application that is already deployed. Below you will find 2 examples on how we used supersedence at a Customer

Note: supersedence does not work within task sequences.

Automated uninstall of the previous version of a software

Often when upgrading an application to a new version you first want to uninstall the previous version if it’s present. This can easily be done using supersedence.

Below you find a simplified flow of how supersedence will work to uninstall the previous version of an application or maybe an application that is being replaced by another.

SuperSedence_uninstall

How to set it up?

1. Find your Old & new App (in this Example Flash 13 (old) & Flash 14 (New))

clip_image002

2. Edit your new (superseding) application, go to the supersedence tab and click Add…

clip_image003

3. In the Specify relationship dialog click Browse…

clip_image004

4. Search for your old application. Select it and click OK

clip_image005

5. In the Specify Supersedence relationship choose which deployment type that replaces the ones from the old Application and check the Uninstall checkbox

Note: the uninstall command needs to be filled correctly on the application that is being replaced.

clip_image006

6. Verify that everything is set correctly and click OK to save your changes

clip_image007

7. Create a deployment of the new Application

8. Watch the old Application being uninstalled and the new installed

The Side-by-Side upgrade.

Sometimes you want to replace an application but not immediately upgrade all existing installations (maybe this will be done at later time). So you want all new installations to be of the new version. One option is to target a separate collection but this can bring overhead. Another option that I prefer is using supersedence. In the example below we want to replace Google Chrome by Firefox. So for now existing chrome installations will remain but all new requests will receive Firefox instead.

Below you find a simplified flow of how supersedence will work for the “Side-by-side” scenario

SuperSedence_RollingUpdate

How to set it up?

Note: It’s assumed that the previous version/Application is already deployed to the Target collection.

1. Edit the New Application, go to the supersedence tab and click Add…

clip_image009

2. On the Specify supersedence relationship dialog click Browse…

clip_image010

3. Find the application that is being replaced, select it and click OK

clip_image011

4. Specify which Deployment type will replace which one from the superseded application and click OK

clip_image012

5. Verify all settings on the application page (uncheck the checkbox allowing users to see multiple deployments of superseded apps if you are working with Available deployment and the Application Catalog’’) and Click OK to save your changes.

clip_image013

6. Create a deployment to the same collection as the superseded Application for the new App and verify that both deployments are present

clip_image014

7. Sit back and let the magic happen.

8. Optionally when you are ready to upgrade the older apps just remove the Deployment and on the next Application Deployment evaluation cycle the application will be upgraded)

Till next time.

Kurt