Creating shims with the Microsoft Application Compatibility Toolkit

I promised a while back to post some examples of creating and using shims. These are a little later than I wanted them to be, but here we are (finally). Since it took so long I added a bonus that I wasn’t able to include in my BriForum 2014 presentation, a video demonstration of the VIrtualRegistry shim.

My top 2 used shims:

  • CorrectFilePaths – These are similar to symbolic links, but are defined per .EXE instead of system wide
  • VirtualRegistry – Redirect registry calls. Can redirect HKLM to HKCU.

For a more detailed explanation on these, visit my previous post on shims.

Formatting your parameters:

CorrectFilePaths –

“original path”;”newpath”

Example:”C:\Programdata\Application X”;”Z:\ApplicationStore\Application X”

This will redirect the application call from the Programdata location to the Z drive. The Z could be a user mapped drive or any location you would prefer it go to. Keeping in mind that only the EXE(s) that you specify will only be redirected.

If you want to use environment variables such as %appdata%, I found that putting them at the begging of the parameter did not work. So I had to use “c:\users\%username%\appdata\roaming”.

Video Example:

VirtualRegisty –

ADDREDIRECT(key_to_redirect_from^key_to_redirect_to)

Example: ADDREDIRECT(HKLM\Software\Application\Database^HKCU\Software\Application\Database)

This will redirect the application whenever it calls the above HKLM key to the HKCU specified in the example.

Video example:

Download the Microsoft Application Compatibility Toolkit (ACT) here

Leave a Reply

Your email address will not be published. Required fields are marked *