Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 685
  • Last Modified:

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?

Thanks
0
Christopher Schene
Asked:
Christopher Schene
  • 5
  • 4
1 Solution
 
connectexCommented:
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.
0
 
connectexCommented:
I found information about the registry virtualization flags. Here's the article: http://msdn.microsoft.com/en-us/library/ms724878(v=vs.85).aspx. Notice the KEY_WOW64_64KEY and KEY_WOW64_32KEY flags. But I'm still working on how to pass them to the .NET calls.
0
 
connectexCommented:
This post goes in to more details: http://blogs.msdn.com/cumgranosalis/archive/2005/12/19/Win64RegistryPart2.aspx. 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?
0
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

 
Christopher ScheneSystem Engineer/Software EngineerAuthor Commented:
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.
0
 
Christopher ScheneSystem Engineer/Software EngineerAuthor Commented:
or maybe Java?
0
 
connectexCommented:
Yes, I've done it in C++ using the old Win32 functions. I haven't moved up to .NET for everything yet. I write command line programs to assist in my automation task. I only do this when I can't find another program that fits my needs.
0
 
connectexCommented:
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.
0
 
Christopher ScheneSystem Engineer/Software EngineerAuthor Commented:
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)...so I'll see if 2010 will work.

I can do Win32 if I REALLY need to,,but hopefull I can avoid that.
0
 
Christopher ScheneSystem Engineer/Software EngineerAuthor Commented:
I really don't have a "how to  implement it" answer, but it is a complex question and I appreciate the help
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now