We're Hiring!
Take the next step in your career and work on diverse technology projects with cross-functional teams.
LEARN MORE
Mountain West Farm Bureau Insurance
office workers empowered by business technology solutions
BLOG
9
26
2018

How to Use VSAE to Create Your First Management Pack to Discover an App Using Its Registry Key

Last updated:
9.16.2020
No items found.

Gabriel Mora is a Software Developer at Infront Consulting. Connect with him on LinkedIn.

Creating a new Management Pack is not complicated—all you need to do is first install Visual Studio Authoring Extensions. This blog will walk you through how to create your first Management Pack in Systems Center Operations Manager, one that will discover apps by identifying their registry key.

Follow this link to download it and install the authoring extensions: https://www.microsoft.com/en-us/download/details.aspx?id=30169

Once that is complete, you can go ahead and open Visual Studio (in my case I have VS 2015) and create a new Visual Studio Project. Give it a name and a path location for the source files.

visual studio project creation


Since I’m using System Center Operations Manager 2016, I’ll choose that as my project target.

You have now created a new Management Pack! But don’t get too excited yet, this bad boy is still empty. There is no logic in there to discover or monitor anything.

Before we add the discovery, let’s take a look at what we can do from inside visual studio. Right click on the project name in the Solution Explorer and navigate to Properties. 

Inside there you have a bunch of options available for you to customize your new Management Pack, including:

With that out of the way, let's go ahead and add the first piece of logic to Management Pack. This logic will discover a particular application using its Registry Key in a Windows Computer. We will see how easy it is to accomplish this goal. 

Download and choose the Management Pack Fragments Library Pack created by the Almighty SCOM God Kevin Holman. Here is the download link: https://gallery.technet.microsoft.com/SCOM-Management-Pack-VSAE-2c506737

Once you download the file, create a new folder in the solution explorer. I will call my folder “Classes”: 

solution explorer folders


Once that is done, import the MP fragment from the RAR file called “Class and Discovery Registry Key Exists.”

class and discovery registry key exists
solution explorer folders


Kevin Holman was kind enough to provide this fragment. Inside it, he is clear that all we need to do to successfully discover is to just FIND and REPLACE. Yes, that is really all you have to do. 

Replace in this fragment the following components with yours:

##CompanyID## 

This is the abbreviation of your MP Namespace (in my case MyTestMP.Samples)

##AppName##

Is the name of the Application it will look for (in my case FakeApp)

##RegKeyPath## 

When replacing you don’t need to add the HKEY_LOCAL_MACHINE because it is already hardcoded in SCOM, so just use SOFTWARE**App**.

This is the registry key path inside of the computer (in my case this will be HKEY_LOCAL_MACHINESOFTWAREFakeApp)

replace company ID
replace app name
replace regkeypath

Save the MP, build it, and you are done! You have created a MP that will check for an application using the registry key.

build started


Import the MP to SCOM and wait a couple of minutes for it to load.

Go to Monitoring >> Change Target and find the class you created:

select items to target


You have now discovered dynamically all machines that contain that particular registry key!

discovered inventory


You are now an MP Dev rookie! Congrats.

Recent Blog Posts

lunavi logo alternate white and yellow
2.11.2025
2
.
7
.
2025
The Future of Test Automation: Key Trends Shaping 2025 and Beyond

Software testing has gone from a chore to a game-changer, thanks to automation. But in 2025, sticking to old methods means falling behind. Stay ahead by embracing the future of test automation—let’s explore the key trends shaping what’s next.

Learn more
lunavi logo alternate white and yellow
2.11.2025
1
.
23
.
2025
The Importance of Cross Browser Testing

Making sure users have a smooth experience across all these platforms is crucial for businesses to stay competitive. Cross-browser testing is now a key part of modern development. It helps teams find and fix problems like layout issues, broken features, or slow performance before users are affected. Let’s look at why cross-browser testing matters and explore tools that make it easier to get the job done.

Learn more
lunavi logo alternate white and yellow
11.19.2024
11
.
8
.
2024
Load & Performance Testing with Azure Load Testing Service

Learn about load and performance testing in Microsoft Azure.

Learn more