Solved

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

Posted on 2011-02-15
9
654 Views
Last Modified: 2012-05-11
I want to read and write to the real (64 bit) registry on windows 7 and 2008.

How do I do that?

Thanks
0
Comment
Question by:cschene
  • 5
  • 4
9 Comments
 
LVL 13

Expert Comment

by:connectex
ID: 34900555
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
 
LVL 13

Expert Comment

by:connectex
ID: 34901130
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
 
LVL 13

Expert Comment

by:connectex
ID: 34901404
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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

Author Comment

by:cschene
ID: 34901515
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
 

Author Comment

by:cschene
ID: 34901521
or maybe Java?
0
 
LVL 13

Accepted Solution

by:
connectex earned 500 total points
ID: 34901548
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
 
LVL 13

Expert Comment

by:connectex
ID: 34901566
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
 

Author Comment

by:cschene
ID: 34930287
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
 

Author Closing Comment

by:cschene
ID: 35033487
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This Micro Tutorial will teach you the basics of configuring your computer to improve its speed. It will also teach you how to disable programs that are running in the background simultaneously. This will be demonstrated using Windows 7 operating…
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question