Registry redirection on 64-bit Windows

前端 未结 4 1022
暗喜
暗喜 2021-01-20 16:47

I am running 64-bit Windows, and I want to create the registry key HKCU\\Software\\Classes\\Wow6432Node\\CLSID\\{myguid}\\InprocServer32 using C#.

What

4条回答
  •  自闭症患者
    2021-01-20 17:25

    By default your C# application is compiled using "Any CPU" (this is the default -- it means that your program will run as a x86 exe on x86 machine, and x64 on x64 machines). What you want to do is change the setting to Win32. Now your program will always run as an x86 exe, so it will be automatically redirected by windows the WOW6432Node. When you access the HKCU\Software\Classes\CLSID{myguid}\InprocServer32 on an x64 machine you will be redirected to the desired key.

提交回复
热议问题