0

我遇到了一些问题..在 C# 中

当我regedit.exe通过我的代码执行时,在 x64 OS 系统中它没有显示

HKLM\SOFTWARE\'wow6432node'

但是当我执行它regedit.exeWindow Key + R告诉我wow6432node

我怎样才能出现wow6432node?我不知道怎么出现...

这是我的代码

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

或者

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

2 回答 2

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.

于 2013-09-23T08:26:03.707 回答
0

你有没有尝试过:

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

我已经在带有 LinqPad 的 x64 机器上测试了这段代码并且可以正常工作。

这里是原题目

编辑

这可能很有用 http://www.rhyous.com/2011/01/24/how-read-the-64-bit-registry-from-a-32-bit-application-or-vice-versa/

于 2013-08-14T06:20:59.450 回答