Create a shim that writes to VirtualRegistry RRS feed

  • Question

  • Hi!

    I've been creating a shim for an application and I'm almost done with getting it fully compatible. The only problem is that the application wants to create registry keys in HKEY_LOCAL_MACHINE\SOFTWARE (which it doesn't have sufficent rights to do). It creates them and after that reads them and I know exactly what keys it's using and would like to create a redirection or something that allows the program to write the registrykeys (the keys support VirtualRegistry)

    I tried using the ADDREDIRECT(oldvalue^newvalue) but that didn't work. Is there another command I should use in this scenario? 

    Best regards,

    Philip Jonsson

    Tuesday, September 13, 2011 9:32 AM

All replies

  • Since your target is HKLM\Software, it should have been taken care of automatically,  with file and registry virtualization.

    If that’s not working, check the virtualization column in either Task Manager or Process Explorer. Is that off?

    Does the application have a manifest?   Is this a an in-house app?

    You can add the shim logging to check if the shim is being applied??

    You can see if the “ACLAYERS.dll” is being used using RegMon to see what is the exact path that the application is trying to use and check if aclayers.dll is in the stack…

    As well you can check http://blogs.msdn.com/b/cjacks/archive/2007/09/27/using-virtualregistry-to-redirect-registry-keys-on-windows-vista.aspx and the act.chm   to see further info on VirtualRegistry shim.

    Sumesh P - Microsoft Online Community Support
    Monday, September 19, 2011 4:11 PM
  • Okej I should give you some more background information regarding our issue. The program we're trying to work in Standard User is Star Micronics Printer Utility. The program is used by receipt printers from StarMicronics and the function of the program is configuring the printer.

    I get the program to function as it should except for one thing which is dependent of the registry. You connect the receipt printer (POS Printer) and the CashDrawer to interact and "find" each other.

    The 4 keys at the top of the list needs to be virtualized:

    I'm no programmer but as I understand from the SUA tool, when I create the OPOS connection it creates a registry key and then reads from it.

    As standard user the registry key is created in:




    But it won't read the information from the keys that are created.

    The original location (when installed with admin rights) is here:



    http://i51.tinypic.com/24v8j8g.png (picture of the program and where the registry writes the information)

    I tried creating a VirtualRegistry,


    But that won't work.

    Hopefully I'm making some more sense now :-)


    Tuesday, September 20, 2011 11:00 AM
  • After I did some research I got it to work by allowing Full Access to:


    That seems like the only way to get it to work since I can't virtualize that. Is there anything else I can do? How secure does the HKEY_LOCAL_MACHINE\SOFTWARE\Classes have to be? Is it OK to let the user have access to that registry key?

    Tuesday, September 20, 2011 1:49 PM
  • Here is some information about the key that might help you.


    The subkeys and registry values associated with the HKEY_LOCAL_MACHINE\SOFTWARE\Classes key contain information about an application that is needed to support COM functionality. This information includes such topics as supported data formats, compatibility information, programmatic identifiers, DCOM, and controls.


    Are you planning on making this change of multiple machines?

    Sumesh P - Microsoft Online Community Support
    Wednesday, September 21, 2011 11:27 AM
  • Hi,

    Thanks for the reply!

    As I can tell from your links, there is no risk in letting our users have full access on the HKEY_LOCAL_MACHINE\SOFTWARE\Classes registry key, or am I wrong?

    Yes we're planning on doing this fix on multiple machines, is this a problem?

    Best regards,


    Friday, September 23, 2011 8:10 AM