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
662 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:Christopher Schene
  • 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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 

Author Comment

by:Christopher Schene
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:Christopher Schene
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:Christopher Schene
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:Christopher Schene
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

While working, an annoying popup showing below will come and we cannot cancel or close it form the screen. The error message will come again and again.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.

820 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