Opening 64-bit Registry by a 32-bit program

M

Mark

I cannot Access HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion (64-bit)
because of registry virutalization in x64...

How can I access this using Vb.NET?

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion", "RegisteredOwner", TxtOwner.Text)

It will be redirected to Wow6432... Any ideas? Please post the code...

Thanks in Advance
 
F

Family Tree Mike

I don't think you can (nor should need to) unless you use the 64 bit version
of .Net.
 
P

Phill W.

Mark said:
I cannot Access HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion (64-bit)
because of registry virutalization in x64...
How can I access this using Vb.NET?

Build your application to target the the "x64" architecture.
My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion", "RegisteredOwner", TxtOwner.Text)

It will be redirected to Wow6432... Any ideas? Please post the code...

There is no way for a 32-bit application (and IL-compiled code is still
linked into a 32-bit process) there is no way around this.

HTH,
Phill W.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top