#GPPT Installing GP Power Tools Build 29 or later can break older Windows Applications

David Meego - Click for blog homepageA recent support case was reported where a site updated to GP Power Tools Build 29 and after the installation a separate Windows Application stopped working.

Initially, the only way the customer was able to get this application working again was to rebuild the workstation by re-imaging back to a clean Windows installation. After a bit of troubleshooting, we were able to identify the cause of the issue.

The application that was having issues would fail on launch with the following error:

System ComponentModel.Win32Exception (0x80004005): Cannot load the “comctl32.dll” DLL into memory.

I won’t bore you with all the troubleshooting steps we went through, but here are the details of what the cause turned out to be.

  • GP Power Tools supports the enabling of Bitmap Scaling to allow Microsoft Dynamics GP to handle scaling correctly on a High DPI Monitor. (See article below).
  • From GP Power Tools Build 29 onwards, Bitmap Scaling is enabled during the installation. This is because we were seeing too many workstations needing Bitmap Scaling but not turning it on. Also, as it needs elevated permissions to make the changes, it is much simpler to enable it during installation while the permissions are elevated anyway.
  • Bitmap Scaling works by enabling the use of Manifest files, then the Manifest files can be used to tell windows that individual applications are not DPI Aware (dpiAware=false).
  • Enabling the Manifest Files is achieved by changing the Registry setting:
    [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide]
    “PreferExternalManifest”=dword:00000001
  • The use of Manifest Files was deprecated after Windows XP, so most modern Windows systems would ignore manifest files.
  • Enabling Manifest Files is applied to all applications on the Windows workstation.
  • Any application which has a manifest file would now attempt to use the manifest file on launch.
  • If the manifest file for the application has not been updated or tested for a while, considering that the manifest file was not being used anymore, it could cause issues.
  • Renaming the manifest file will stop it being used and the application will run as before.
  • It would also be possible to update the manifest file to fix it, but renaming it is the simplest solution.
  • Moral: Developers of Windows Applications should either keep their manifest files up to date, or remove them entirely if they are no longer used/needed.

Manually disabling and enabling the Bitmap Scaling registry setting within GP Power Tools and rebooting the workstation proved that the registry change was the issue.

Renaming the manifest files for the crashing application solved the issue while keeping bitmap scaling enabled.

More Information about fonts and scaling for High DPI can be found on this article:

Hope this information helps resolve any issues that you might come across.

David

This article was originally posted on http://www.winthropdc.com/blog.

Please post feedback or comments

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.