About Virtualization, VDI, SBC, Application Compatibility and anything else I feel like
Yesterday I wrote about troubleshooting an application that used Com Port redirection in Citrix.
During the troubleshoot I noticed that the application used an ActiveX component, MSCOMM32.OCX, for serial communication.
I wanted to quickly test if the component was correctly registered so I searched the registry from HKEY_CLASSES_ROOT for mscomm32.ocx.
This confirmed that the component was registered:
My next check was to confirm if the control was actually working with a VB Script. For that I needed the ProgID from the same registry key:
The VBS code is then simply:
Set objMSComm = CreateObject("MSCommLib.MSComm")
Executing the script failed with error 80040112. I looked up this error code and it stands for CLASS_E_NOTLICENSED.
A google search lead me to this kb article which explains that it’s a license issue that only occurs when you create the control at run-time.
At this point I wasn’t sure if my problem was related to
I decided to open MSCOMM32.OCX in Ida Pro to see where this error comes from. I searched in the Strings Tab for the word Licenses which brought up this part of the code:
So a registry key under HKEY_CLASSES_ROOT\Licenses is checked. I opened sub_21C118D3 and set a breakpoint on RegQueryValueA. The debugger shows us the contents of lpString and lpString2 when we hover the mouse over:
So by creating the key HKEY_CLASSES_ROOT\Licenses\4250E830-6AC2-11cf-8ADB-00AA00C00905 and set it’s default value to kjljvjjjoquqmjjjvpqqkqmqykypoqjquoun we will pass the license check.
Windows Registry Editor Version 5.00
After creating the registry key, the vbs script worked (it didn’t make the application work though but more about that in yesterday’s post).
.NET .NET FrameWork Active Directory Altiris Apple Automation Manager Citrix Dell Delphi Excel Exchange Exchange2003 Exchange2010 Hack HP iOS Java LinkedIn Linux Lync MSI Office Office 2010 Passat Password PowerPoint PowerShell RES RNS510 SasLibEx SCOM Security Terminal Server ThinApp TSAdminEx VBS VCDS Visual Basic Visual Studio VMWare Volkswagen VW Windows PE Wordpress XenApp