none
Registry filter on HKCU

    Question

  • I followed the nice blog below to use the registry filter. Like a charm.

    http://blogs.msdn.com/embedded/archive/2006/11/19/registry-filter-tips.aspx

    But I also want to filter a key in the current user (HKCU) section. I changed the ClassKey to "HKCU" but nothing persists in the RelativeKeyName. Is the filter designed to work when the ClassKey is set to "HKCU" or specially for "HKLM"?

    Regards,
    Mark
    Tuesday, January 09, 2007 2:08 PM

Answers

  • REGL_LINK really is reserved for system use.

    Another option is to put the user hive in the exclusion list.

    This does mean all user regsitry keys will be persisted. Will that work for you?

    -milong

    Saturday, January 13, 2007 1:40 AM

All replies

  • Mark,

    This is interesting... HKCU is just a link to the real user key in HKEY_USERS (HKU). Can you please try and protect the real keys under the right user key in HKU and let us know if this works?

    Thanks,

    Oren

     

    Tuesday, January 09, 2007 4:53 PM
  • Oren,

    Thanks for your pointer, but unfortunately this also does not persist the reg settings.

    Settings:
    [HKLM\SYSTEM\CurrentControlSet\Services\RegFilter\Parameters\MonitoredKeys\2]
        ClassKey REG_SZ HKU
        RelativeKeyName Reg_SZ S-1-5-21-1547161642-861567501-682003330-1003\Software\VB and VBA Program Settings\
        FileNameForSaving Reg_SZ test.reg 

    PS. I also tried an other RelativeKeyName without the spaces.

    Mark

    Wednesday, January 10, 2007 3:52 PM
  • Mark,

    I think the problem is the user hive is not loaded when regfilter initializes. Regfitler will not persist the key if it cannot find it during initialization. However, keys under .DEFAULT (used by the system context) is persisted.

    There doesn't seem to be a workaround. What keys are you trying to persist? Can you prepopulate them once?

    -milong

    Wednesday, January 10, 2007 11:06 PM
  • The customer uses a 3rd party software tool that saves some user specific data in “HKCU\Software\VB and VBA Program Settings\”. To answer your question this key is already populated but changes are not persistent.

     
    Well as I was thinking, since the possibility is there that the user hive is not loaded by regfilter, maybe it is possible to have a REG_LINK from the above key and link it to the HKU\.DEFAULT or to HKLM\Software. Or is this something that I really should not do.

    Thursday, January 11, 2007 11:17 AM
  • REGL_LINK really is reserved for system use.

    Another option is to put the user hive in the exclusion list.

    This does mean all user regsitry keys will be persisted. Will that work for you?

    -milong

    Saturday, January 13, 2007 1:40 AM
  • Thnks for the information all,

     I now have the complete NTUSER.DAT + LOG added to the FBWF's exclusion list. Making all HKCU keys persistent.

    Regards,
    Mark
    Monday, January 15, 2007 3:09 PM
  •  

    I have similiar problem here.

     

    My application writes default settings in

     

    HKEY_LOCAL_MACHINE\SOFTWARE\MyApplicationName

     

    and allows users to change settings and save them in

     

    HKEY_CURRENT_USER\SOFTWARE\MyApplicationName

     

    I also followed that blog and add two new entries for the above two registry keys.

     

    The one which uses KHLM as ClassKey works but the other which uses HKCU doesn't.

     

     

    ==============================================================
    EyesBoard - A cool software keyboard which looks and behaves like a physical keyboard
    http://www.plazalogic.com/eyesboard/
    ==============================================================

     

     

     

    Monday, December 29, 2008 7:29 AM
  • Oops... I forgot to add NTUSER.dat & ntuser.dat.log as exclusions.

     

    Monday, December 29, 2008 8:28 AM