咨询Wix安装程序的注册表项是否应置于Microsoft文件夹下
Great question—you’re absolutely right to second-guess that example path, because it’s just a placeholder, not a mandatory requirement. Let’s break this down clearly:
The Wix documentation uses placeholder values
TheSoftware\Microsoft\MyApplicationNamepath in that guide is just an example. BothMicrosoftandMyApplicationNameare meant to be replaced with your actual vendor name and application name. It’s not a rule that you have to nest your app’s registry entries under Microsoft’s root path.Microsoft’s official guidance favors vendor-specific paths
For third-party applications, the standard and recommended practice in the Windows ecosystem is to useSoftware\[Your Vendor Name]\[Your App Name]as your registry scope. TheSoftware\Microsoftdirectory is reserved for Microsoft’s own products and system components. Putting your app’s entries here is non-compliant with best practices, risks confusion with Microsoft’s native registry data, and makes future maintenance (like troubleshooting or uninstall cleanup) more difficult.The
installedkey belongs with your app’s own registry data
Thatinstalledflag is meant to track your application’s installation state, so it logically belongs under your vendor/app-specific path, not under Microsoft’s. Keeping all your app’s registry entries grouped together makes your installer’s logic cleaner and aligns with how almost every third-party Windows application structures its registry data.
Here’s what the corrected registry value should look like (using your vendor and app names):
<RegistryValue Root="HKCU" Key="Software\MyVendorName\MyApplicationName" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
内容的提问来源于stack exchange,提问作者Pablo Fernandez

