0

I got some problem..in C#

When I execute regedit.exe through my code, in x64 OS System it didn't show

HKLM\SOFTWARE\'wow6432node'

but when i execute regedit.exe through Window Key + R it show me wow6432node

how can i show up wow6432node? I don't know how to show up...

here is my code

        private void RegeditCall_Click(object sender, EventArgs e)
        {
            Process.Start("C:\\Windows\\regedit.exe");
        }

or

        private void RegeditCall_Click(object sender, EventArgs e)
        {
            Process.Start("regedit.exe");
        }

2 Answers 2

0

Have you tried:

System.Diagnostics.Process.Start("regedit.exe");

I have tested this code in x64 machine with LinqPad and works.

Here is orginal topic

Edit

This can be useful http://www.rhyous.com/2011/01/24/how-read-the-64-bit-registry-from-a-32-bit-application-or-vice-versa/

4
  • @jeongseok-park I think this is connected with priviliges problem. But I only guess. What type of application you got? web or win forms? Aug 14, 2013 at 7:04
  • My allpication type is Winforms. and I want to see result of 'Process.Start("regedit.exe")' same as 'Window Key +R' but it's different. Execute regedit.exe through 'cmd.exe' also different with 'Window Key + R' result Aug 14, 2013 at 7:21
  • cmd.exe result is same as 'process.start' result Aug 14, 2013 at 7:28
  • @jeongseok-park Please do this: Open Event viewer in Control Panel -> System and Maintenance -> Administrative Tools -> Event Viewer -> Windows Logs -> Applications. After do action check for errors and put stacktrace. Aug 14, 2013 at 8:40
0

I've just had the same issue: Check your C# app isn't built for x86.

If a 32bit process executes regedit, then windows will launch the 32bit version of regedit. In this version HKLM\Software actually points to HKLM\Software\Wow6432Node.

If you use start -> run -> regedit (Assuming your running a 64bit version of windows), this will launch the 64bit version of regedit. Now you can see the HKLM (or HKCU) Wow6432Node key exists.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.