Detecting installed application (Full Version)

All Forums >> [Management Products] >> System Center Products >> System Center Configuration Manager



Message


Peekstra -> Detecting installed application (4/14/2008 8:38:28 AM)

I'm currently trying to create some collections which contain PCs failing a baseline item, for example antivirus.

To detect the application and version (Symantec Endpoint protection 11) I created a configuration item which checks for the size of the file vpshell2.dll in the "c:\program files\symantec antivirus" directory.

Next, I created a new collection and (as the SCCM administrator companion book describes) add a query to it which checks if the localized displayname matches the configuration item AND check if the compliance state is equal to Non compliant

This seemed to work fine but then I discovered that the AV program wasn't detected on several systems because it sometimes is installed in "c:\Program Files\Symantec\Symantec Endpoint Protection\" [:@]

So my question is, how can I reliably detect this application.... I've considered running a wildcard match searching c:\program files and below or creating two groups (really ugly).

Searching the c:\program files doesn't seem to be very efficient so I would like to know if there's an easier way to solve this. Something like checking for both locations and only include the PC when both items are not compliant.

Is there an easy way to do this?

thanks!

Peekstra

PS I've also tried different detection methods like a registry key version number but I coulnd't find it. Also, the installer uses an exe file so no MSI detection is possible (?)






jsandys -> RE: Detecting installed application (4/14/2008 9:51:35 AM)

Does the app show up in Add/Remove Programs?  Check HKLM\software\microsoft\windows\current version\uninstall.  Note that even though the app installs with an exe, this exe is probably just a wrapper for an msi. 

You can also use software inventory to inventory vpshell2.dll; software inventory is not necessarily limited to a specific path and can use wildcards.




Peekstra -> RE: Detecting installed application (4/14/2008 10:25:49 AM)

Thanks for the HKLM link jsandys! The AV application is listed here including a version key which makes things very easy (I that the exe was indeed a wrapper for the MSI which shows in the uninstall key).

Also, using software inventory seems like a good idea for programs which don't store their info in the registry.

thanks again!

Peekstra.




Peekstra -> RE: Detecting installed application (4/14/2008 10:37:52 AM)

Whoops, I thought that I could just query the value of a registry key, but you can only check if it exists or not?

SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FB8A4E30-9915-4814-ADF9-42E00D9FDC3D}\displayversion contains the value 11.0.1000.1375 but I can only check if this key exists?

Or is it common that the "{FB8A4E30-9915-4814-ADF9-42E00D9FDC3D}" keyname "contains" the program version?





mcarriere893 -> RE: Detecting installed application (4/14/2008 10:59:21 AM)

Hey Peekstra, any software showing up under the uninstall key will certainly be in the hardware inventory (ARP). Check out various Asset Intelligence and software reports in your console. Good thing about using ARP (add rem programs), is that you don't need to specify locations to look, like you should do when querying against files.

You can probably quite simply just create a subselect query for your collection of systems that "do not have" your AV product and/or version. Tons of subselect examples in the forums.




Peekstra -> RE: Detecting installed application (4/16/2008 5:01:47 AM)

Hi,


I've succesfully created the subselections with the ARP info, thanks!

It's strange though that you can't check the registry values directly from the baseline... SCCM seems a bit incomplete here to me and it can also be quite confusing that you can accomplish the tasks thing in (too?) many ways (for a humble beginner [;)] ).

I'll also consider checking the registry value in the baseline via a VBS script.

thanks.




mcarriere893 -> RE: Detecting installed application (4/16/2008 9:58:44 AM)

quote:

It's strange though that you can't check the registry values directly from the baseline

I don't (probably just me) get what you mean?
The ARP portion of hardware inventory does go into the registry (HKLM\software...\Uninstall) and grab regsitry data. If a REG_SZ called DisplayName exists for a product, then it is collected, and availabe as "Version" in the ARP class.

For even more info, check out the "Installed Software" class! It contains ARPName, Product version, installed location, source, etc, etc. That might be more valuable for you to use if you don't have complete control over the location where all previous installs were done.

As always, ConfigMgr is very configurable, so you can extend your inventories via the mof, or mifs as required/desired.




jsandys -> RE: Detecting installed application (4/16/2008 10:02:30 AM)

I think Peekstra is using Desired Configuration Management thus some of the confusion on your part Mark.




mcarriere893 -> RE: Detecting installed application (4/16/2008 10:11:44 AM)

That's what I thought, just not assumed. That would be kinda a weird thing to use for this type of need as the info is already available with inventories... why re-invent the wheel?...unless inventories are not enabled, so DCM could be utilized




Peekstra -> RE: Detecting installed application (4/16/2008 10:17:00 AM)

I understand now that all the registry key info is available via the hardware info collection process. So it's no problem for me to create a group based on a product version with a query (and if the info isn't present, SCCM can be extended).

It's still not clear to me how I can get the disered configuration function to work. What I was trying to do is add a configuration item to the baseline to have it check if the latest version of a program is installed. I was then using that information to create a collection (but I now accomplish that with the ARP query).

So is it possible to check for a program version in the desired configuration management...? And if so, how?

thanks,

Peekstra. 

EDIT: I wasn't clear on that I'm trying to get the desired config management to work. In the book there was an example about creating collections using the desired config info. I just didn't realize then that it isn't a very efficient way to do this.




mcarriere893 -> RE: Detecting installed application (4/16/2008 1:44:08 PM)

Well, probably (I think) the quickest baseline item would be an Application Configuration Item. I see you have an msi for the app, so use the detection method "Use Windows Installer (MSI) detection". Open the msi and the product code and version will auto fill, or find the values in the registry and manually enter them.

I don't think you'd need any objects or settings as you would just get back "Not detected" if it is not installed.

As far as the collection query (among other items you want to return), use SMS_G_System_CI_ComplianceState.IsDetected (where 0 is not detected and 1 is detected).

Without using the msi detection method, you may need to look at using a general compliance item, and using a script to check for the existance of the specific keys and data (like the specific uninstall key, and then perhaps the DisplayVersion). I don't have that app installed, but I find that typically different versions of apps get a different uninstall key instead of just changing the data (like displayname, displayversion, etc).

One thing you may need to consider re DCM vs Inventory for this type of scenario is their schedules. If inventory is taken every day and DCM once a week, obviously you'd be going the inventory route so that your collection data would be update faster.

I'm sure there are other admins who are more of a DCM expert than I. Perhaps check out the Microsoft technet (ConfigMgr) forums if no one hwere can give you any additional/better advice.




Peekstra -> RE: Detecting installed application (4/17/2008 11:06:26 AM)

Thanks for all the info Mark!

The problem was that the MSI was bundled in an executable but I discovered the MSI on the AV server.

I'm already using the SMS_G_System_CI_ComplianceState.IsDetected which works fine (it's no problem yet that the data can be 1 week old but I can then use the alternative).

I still hope that a future release of SCCM will add an option to read a registry key value to DCM which will make checking a version for programs without an MSI a bit easier.

It's also a good idea to forbid installation of software without an MSI installer, I'll be working on that... [:)]


Peekstra.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.3588867