且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Visual Studio部署项目错误时写入注册表

更新时间:2023-01-19 10:29:07

正在写入注册表,只是错误的键。 32位安装程序写入HKLM\Software\Wow6432Node,32位程序看到的一组注册表项。您的应用程序将以64位模式运行,不会像这样重定向。

It is writing to the registry okay, just to the wrong key. 32-bit setup programs write to HKLM\Software\Wow6432Node, the set of registry keys that 32-bit programs see. Your app will run in 64-bit mode, it won't get redirected like that.

您需要在安装项目中设置目标平台。或者强制您的应用程序以32位模式运行,并在Build选项卡中使用Target Platform = x86设置。

You'll need to set the target platform in your setup project. Or force your app to run in 32-bit mode with the Target Platform = x86 setting in the Build tab.