Strange Registry Virtualization issue

Posted: 08-01-2008, 09:05 PM
Hi,

During the installation of my application which requires elevated
privileges, I install some registry keys under HKLM. When I first launch
my application, I read data from HKLM.

However on some vista machine it does not work. Using ProcessMonitor, I
saw that instead of trying to read HKLM he actually tries to read from
the virtualized HKLM, i.e. HKCU\Software\Classes\VirtualStore\MACHINE.

Why does it do that? I've verified that I'm only opening the key with
read access, not write access?

Thanks,
Manu

PS: the vista machines are all running with UAC turned on.

Strange Registry Virtualization issue


Responses to "Strange Registry Virtualization issue"

FromTheRafters
Guest
Posts: n/a
 
Re: Strange Registry Virtualization issue
Posted: 08-01-2008, 10:47 PM

"Emmanuel Stapf [ES]" <manus@newsgroups.nospam> wrote in message
news:OkO45oB9IHA.3848@TK2MSFTNGP04.phx.gbl...
> Hi,
>
> During the installation of my application which requires elevated
> privileges, I install some registry keys under HKLM. When I first launch
> my application, I read data from HKLM.
>
> However on some vista machine it does not work. Using ProcessMonitor, I
> saw that instead of trying to read HKLM he actually tries to read from the
> virtualized HKLM, i.e. HKCU\Software\Classes\VirtualStore\MACHINE.
>
> Why does it do that?
Vista provides the virtualization for programs not written for Vista.

http://technet.microsoft.com/en-us/m.../cc138019.aspx



Emmanuel Stapf [ES]
Guest
Posts: n/a
 
Re: Strange Registry Virtualization issue
Posted: 08-02-2008, 02:17 PM
FromTheRafters wrote:
> Vista provides the virtualization for programs not written for Vista.
> http://technet.microsoft.com/en-us/m.../cc138019.aspx
This is not exactly what I was referring too. My problem is not whether
virtualization is enabled or not. It is that the documentation says it
will merge the content of the virtual store with the one in HKLM and it
is clearly not doing that since my application cannot see the keys that
are in HKLM.

Regards,
Manu
FromTheRafters
Guest
Posts: n/a
 
Re: Strange Registry Virtualization issue
Posted: 08-04-2008, 07:26 PM

"Emmanuel Stapf [ES]" <manus@newsgroups.nospam> wrote in message
news:%23Fe2IqK9IHA.1428@TK2MSFTNGP06.phx.gbl...
> FromTheRafters wrote:
>> Vista provides the virtualization for programs not written for Vista.
>> http://technet.microsoft.com/en-us/m.../cc138019.aspx
>
> This is not exactly what I was referring too. My problem is not whether
> virtualization is enabled or not. It is that the documentation says it
> will merge the content of the virtual store with the one in HKLM and it is
> clearly not doing that since my application cannot see the keys that are
> in HKLM.
My understanding is that it reads both and presents a
merged view to the application with the virtualized keys
taking precedence over the ones in HKLM. If you want
to make HKLM take precedence - remove the keys from
the virtualized store and it should use the HKLM ones.

In other words, make the virtual store keys in question
non-persistent and the HKLM will be used each time
because no virtualized version will be found.

http://msdn.microsoft.com/en-us/library/bb530198.aspx


Emmanuel Stapf [ES]
Guest
Posts: n/a
 
Re: Strange Registry Virtualization issue
Posted: 08-05-2008, 03:58 AM
FromTheRafters wrote:
> My understanding is that it reads both and presents a
> merged view to the application with the virtualized keys
> taking precedence over the ones in HKLM. If you want
> to make HKLM take precedence - remove the keys from
> the virtualized store and it should use the HKLM ones.
The issue is that there are no keys in the virtualized store, the keys
are only in the HKLM one. So I don't understand why he can't read the
one from HKLM.
> In other words, make the virtual store keys in question
> non-persistent and the HKLM will be used each time
> because no virtualized version will be found.
I agree this is what should be happening, but it is not. Any hint on how
to debug this so that we can find the root cause of this behavior?

Thanks,
Manu
Emmanuel Stapf [ES]
Guest
Posts: n/a
 
Re: Strange Registry Virtualization issue
Posted: 08-05-2008, 03:58 AM
FromTheRafters wrote:
> My understanding is that it reads both and presents a
> merged view to the application with the virtualized keys
> taking precedence over the ones in HKLM. If you want
> to make HKLM take precedence - remove the keys from
> the virtualized store and it should use the HKLM ones.
The issue is that there are no keys in the virtualized store, the keys
are only in the HKLM one. So I don't understand why he can't read the
one from HKLM.
> In other words, make the virtual store keys in question
> non-persistent and the HKLM will be used each time
> because no virtualized version will be found.
I agree this is what should be happening, but it is not. Any hint on how
to debug this so that we can find the root cause of this behavior?

Thanks,
Manu
FromTheRafters
Guest
Posts: n/a
 
Re: Strange Registry Virtualization issue
Posted: 08-06-2008, 05:49 PM

"Emmanuel Stapf [ES]" <manus@newsgroups.nospam> wrote in message
news:4897CFCD.8040802@newsgroups.nospam...
> FromTheRafters wrote:
>> My understanding is that it reads both and presents a
>> merged view to the application with the virtualized keys
>> taking precedence over the ones in HKLM. If you want
>> to make HKLM take precedence - remove the keys from
>> the virtualized store and it should use the HKLM ones.
>
> The issue is that there are no keys in the virtualized store, the keys are
> only in the HKLM one. So I don't understand why he can't read the one from
> HKLM.
>
>> In other words, make the virtual store keys in question
>> non-persistent and the HKLM will be used each time
>> because no virtualized version will be found.
>
> I agree this is what should be happening, but it is not. Any hint on how
> to debug this so that we can find the root cause of this behavior?
Sorry, no. You may want to contact Microsoft support
for this issue. This function is implemented in the kernel.
They may suggest that you rewrite the program so that
it doesn't have to use virtualization at all - which is the
best path anyway.



 
LinkBack Thread Tools Display Modes
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtualization of registry and files? Norman Diamond Windows Vista Security 3 12-28-2007 06:51 AM
Vista registry virtualization Bob Butler Windows Vista Security 6 08-06-2007 06:10 AM
Registry corruption and strange behavior Sethu Windows Vista Performance & Maintenance 0 06-24-2007 02:39 PM
Program virtualization vs. installer virtualization Roof Fiddler Windows Vista 1 09-21-2006 02:25 PM
Strange Registry Keys Help Chris P. Windows XP 0 07-13-2003 06:26 AM