/build/static/layout/Breadcrumb_cap_w.png

KACE: How to Create Custom Inventory Rules That Inventory Internet Explorer 9 and 10

How to Create Custom Inventory Rules That Inventory Internet Explorer 9 and 10

Today I will be showing how to use simple custom inventory rules to inventory Internet Explorer 9 and 10 on Windows 7 x64 machines.  You might wonder how this could be useful.

The purpose behind creating these custom inventory rules is simple. Microsoft has changed how Internet Explorer is integrated into the operating system causing IE 9 and IE 10 to not show up in inventory.

Prerequisites:

  • Windows 7 x64
  • Machines with IE9 or IE10
  • K1000 with 5.4 (Might work with older versions)

There are several ways to identify the browser version but I chose to locate a certain Registry Key value.


Step 1:

Locate a Registry Key Value that changes from version to version but the path remains the same.


Step 2:

Create a New Software Item


Step 3:

Fill out the Necessary Fields

Custom Inventory Rule for IE 9

Here is the text for the custom inventory rule that inventories Internet Explorer 9

RegistryValueGreaterThan(HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer, svcUpdateVersion, 9) AND

RegistryValueLessThan(HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer, svcUpdateVersion, 10)

Custom Inventory Rule for IE 10

Here is the text for the custom inventory rule that inventories Internet Explorer 10

RegistryValueGreaterThan(HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer, svcUpdateVersion, 10

Now as machines begin to inventory they will be running this custom inventory rule.  If the machines meet the requirements set by the rule, they will be counted as installed on that machine!

If this article helps you, please comment and rate this article!

Have a great day and happy kboxing!

Bonus!

There are orange question marks everywhere on the kbox giving you helpful hints.  Here are some acceptable commands for custom inventory rules.

GENERAL INFORMATION
The use of the Custom Inventory Rules is very powerful and you should read the documentation before attempting to configure one of these rules. There are a variety of concerns that should be reviewed before enabling this. The notes here are meant only as a quick syntax reference for the available functions.

FUNCTION SYNTAX
Windows (* = 5.2+)
|  Linux
|  | Mac OS 
|  | |   
W  L M - DirectoryExists(path)
W  L M - FileExists(path)
W* L M - FileExistsWithMD5(path, value)

W      - FileVersionEquals(path, version)
W      - FileVersionLessThan(path, version) 
W      - FileVersionGreaterThan(path, version) 

W      - ProductVersionEquals(path, version) 
W      - ProductVersionLessThan(path, version) 
W      - ProductVersionGreaterThan(path, version) 

W  L M - FileInfoGreaterThan(fullpath, attribute, type, value)
W  L M - FileInfoLessThan(fullpath, attribute, type, value)
W  L M - FileInfoEquals(fullpath, attribute, type, value)

W      - RegistryKeyExists(registryPath) 
W      - RegistryValueEquals(registryPath, valueName, value) 
W      - RegistryValueLessThan(registryPath, valueName, value) 
W      - RegistryValueGreaterThan(registryPath, valueName, value) 

W  L M - EnvironmentVariableExists(var)
W* L M - EnvironmentVariableGreaterThan(var, type, value)
W* L M - EnvironmentVariableLessThan(var, type, value)
W* L M - EnvironmentVariableEquals(var, type, value)

W  L M - FilenamesMatchingRegexExist(fullpath,regex)
W  L M - FilenamesMatchingRegexGreaterThan(fullpath,regex,value)
W  L M - FilenamesMatchingRegexLessThan(fullpath,regex,value)
W  L M - FilenamesMatchingRegexEqual(fullpath,regex,value)

     M - PlistValueExists(fullpath, entry)
     M - PlistValueGreaterThan(fullpath, entry, type, value)
     M - PlistValueLessThan(fullpath, entry, type, value)
     M - PlistValueEquals(fullpath, entry, type, value)

W      - RegistryValueReturn(registryPath, name, type) 
W* L M - EnvironmentVariableReturn(var, type)
W  L M - FileInfoReturn(path, attribute, type) 
W* L M - FilenamesMatchingRegexReturn (fullpath, regex, type)  
W  L M - ShellCommandTextReturn(command)
W  L M - ShellCommandDateReturn(command)
W  L M - ShellCommandNumberReturn(command)
     M - PlistValueReturn(fullpath, entry, type)
ARGUMENT NOTES

type can be TEXT, NUMBER, or DATE
attribute on Windows can be: Comments, Language, CompanyName, LegalCopyright, FileBuildPart, LegalTrademarks, FileDescription, OriginalFilename, FileMajorPart, PrivateBuild, FileMinorPart, ProductBuildPart, FileName, ProductMajorPart, FilePrivatePart, ProductMinorPart, FileVersion, ProductName, InternalName, ProductPrivatePart, ProductVersion, SpecialBuild, CreatedDate, ModifiedDate, AccessedDate
attribute on UNIX/OS X can be: device_number, inode, number_links, owner, group, size, access_time, modification_time, creation_time, block_size, blocks

EXAMPLES
FileExists(C:\WINDOWS\notepad.exe)
ShellCommandTextReturn(cmd /c type c:\WINDOWS\win.ini)
FileVersionEquals(C:\Program Files\Internet Explorer\iexplore.exe,8.00.6001.18702 (longhorn_ie8_rtm(wmbla).090308-0339)) 
RegistryValueEquals(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion,CSDVersion,Service Pack 2) 
FileExists(/bin/cp)
FileInfoReturn(/etc/hosts, modification_time, DATE)

Comments

  • you should always remember, if you use spaces after a comma or elsewhere where it is not part of a command the Custom Inventory Rule could fail. Seen this often in 5.4 with 5.4 agents - Nico_K 11 years ago
  • @Nico_K that is correct. Syntax Syntax Syntax - c_brock 11 years ago
  • This only works with 64 bit os for 32 bit you can use
    IE9-32bit
    RegistryValueEquals(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer, svcKBNumber,KB2809289)
    IE10-32bit
    RegistryValueGreaterThan(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer, svcVersion,10.0) - SMal.tmcc 11 years ago
    • Thanks for the 32bit reg keys, SMal.tmcc! - awingren 11 years ago
  • Awesome post, c_brock! This is very useful. It reminds me we're going to upgrade to IE8 soon... yes, I said upgrade to IE8... Thanks to many legacy apps! At least it's a step in the right direction!

    Thanks again for the custom inventory rules!
    -awingren - awingren 11 years ago
  • I just noticed/remembered one of my KACE trainers helped me create a custom inventory rule that returns the version under "Custom Inventory Fields" rather than just counting the installation.

    RegistryValueReturn(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer, Version, NUMBER)

    OR

    RegistryValueReturn(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer, Version, TEXT)

    The number drops the decimal and text shows the entire number in a string. It can be nice for creating smart labels or reports etc... - awingren 11 years ago
  • This worked perfectly for me in my KAC1000 environment with over 700 machines. We are getting tready to move to Office365 and this report helped us show we were ready.
    Thanks you.
    I also adapted it to find a particular font that got loose in our environment. - davidgrand 10 years ago
  • Thank you for all the awesome comments!! - c_brock 10 years ago
  • Has anyone ever tried 3 levels?
    Example
    FileExists(stuff)
    AND
    FileExists(stuff)
    AND
    FileExists(stuff) - brucegoose03 8 years ago
    • This helped me with one that I had been struggling with. Thank you! - DaveMT 6 years ago
This post is locked
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ