/build/static/layout/Breadcrumb_cap_w.png

K1000 Custom Inventory Field based on md5 checksum on Windows

We are deploying Java JCE Unlimited Crypto files through a K1000 File Sync, and we need to replace the originally installed version of the files, and guarantee the new file is in place. In order to do this we wanted to make use of an MD5 checksum. 

Since Windows does not ahave a build in command line tool to provide this, we looked to PowerShell, since it can provide MD5 cehcksums.

First we created a new Software Inventory item, with the following Custom Inventory Rule:

ShellCommandTextReturn(powershell.exe -command "[BitConverter]::ToString((new-object Security.Cryptography.MD5CryptoServiceProvider).ComputeHash((new-object IO.FileInfo('C:\Program Files (x86)\Java\jre6\lib\security\local_policy.jar')).OpenRead())).Replace('-','').ToLower()")

You will need one Software Inventory record for each of the files provided in the JCE (local_policy.jar & US_export_policy.jar) updating the FileInfo(path) in the above line.

This will return the MD5 Checksum as a [string]

You can then create a smart label to check if the value of the software inventory record starts with the appropriate checksum value from the correct file.



Comments

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