Link to home
Start Free TrialLog in
Avatar of Christopher Schene
Christopher ScheneFlag for United States of America

asked on

How do i read and write from the real (64 bit) registry from a 32 bit vbs running on 2008 or Win7

I want to read and write to the real (64 bit) registry on windows 7 and 2008.

How do I do that?

Avatar of connectex
Flag of United States of America image

There's optional flag that's can be used on Win32 registry calls to allow a 32-bit program to read the 64-bit registry (and vice-versa). Let me see what I can find on the .NET side.
I found information about the registry virtualization flags. Here's the article: Notice the KEY_WOW64_64KEY and KEY_WOW64_32KEY flags. But I'm still working on how to pass them to the .NET calls.
This post goes in to more details: It seems up until .NET 4.0 it wasn't possible to manage both side of the virtualize registry. What version on .NET are you using?
Avatar of Christopher Schene


On the Win7 and 2008 machines I am running on, I believe 3.5 SP1 is always installed by default.

I wonder if I can use just a plain old C++ program to do this.
or maybe Java?
Avatar of connectex
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
So it seems you need to move up to .NET 4.x or use the pinvoke functionality. It's really not very clean either way based on what you've told me.
Sorry, i was pulled off on something else.

I can't rely on .net 4.0 being there so I am out of luck in that direction.

I have IS 2010 (I am usng 2008) I'll see if 2010 will work.

I can do Win32 if I REALLY need to,,but hopefull I can avoid that.
I really don't have a "how to  implement it" answer, but it is a complex question and I appreciate the help