TestComplete Tip: How To Verify and Log Windows Hot Fixes

Was XP SP2 installed when you spotted that bug?
Was the latest Microsoft security patch on the PC that logged the problem when it logged the problem a week ago?
Does the new build of the tested app require a .NET framework service pack?


Here's a VBscript class to log and verify Windows Hot Fixes you can use help with all of those questions.


The routine LogAll adds a list of all installed hot fixes to the remark field in a log message.
You can use it when reviewing a log to determine what patches Windows had installed.


The function Verify(hotfixid) will return true if the string in hotfixid matches an installed patch. For
example, XP Service Pack 2 has hot fix id of "KB811113", you can check for XP SP2 with the call Verify("KB811113").


The example code works as is. Paste this code into a new VBscript project to see it in action.


Also, the WindowsHotFixes class is reusable. You can add it to a new file like 'WindowsHotFixesClass' and include
the file in your project using 'USEUNIT WindowsHotFixesClass then just add a few lines to create a new instance
as demonstrated in the routine TestWindowsHotFixesClass.


Close

By submitting this form, you agree to our
Terms of Use and Privacy Policy

Thanks for Subscribing

Keep an eye on your inbox for more great content.

Continue Reading

Add a little SmartBear to your life

Stay on top of your Software game with the latest developer tips, best practices and news, delivered straight to your inbox