Tôi đã viết trình cài đặt WiX hoạt động hoàn hảo với Windows XP, nhưng khi cài đặt vào hộp Windows 7, tôi gặp sự cố với các mục đăng ký. Tôi cần phải thêm một mục nhập HKLM cũng như mục đăng ký cho chương trình để hiển thị trong trình đơn bắt đầu. Đây là mã tôi đang sử dụng cho cả hai loại mục nhập:WiX sẽ không thêm cài đặt đăng ký HKLM trong Windows 7 cài đặt
<!-- Create the registry entries for the program -->
<DirectoryRef Id="TARGETDIR">
<Component Id="RegistryEntriesInst" Guid="...">
<RegistryKey Root="HKLM"
Key="Software\$(var.Manufacturer)\$(var.ProductName)"
Action="createAndRemoveOnUninstall">
<RegistryValue
Type="string"
Name="installed"
Value="true"
KeyPath="yes"/>
</RegistryKey>
</Component>
<Component Id="RegistryEntriesVer" Guid="...">
<RegistryKey Root="HKLM"
Key="Software\$(var.Manufacturer)\$(var.ProductName)"
Action="createAndRemoveOnUninstall">
<RegistryValue
Type="string"
Name="version"
Value="$(var.ProductVersion)"
KeyPath="yes"/>
</RegistryKey>
</Component>
</DirectoryRef>
<!-- To add shortcuts to the start menu to run and uninstall the program -->
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="ApplicationShortcut" Guid="...">
<Shortcut Id="ApplicationStartMenuShortcut"
Name="$(var.ProductName)"
Description="..."
Target="[SERVERLOCATION]$(var.Project.TargetFileName)"
WorkingDirectory="SERVERLOCATION"/>
<Shortcut Id="UninstallProduct"
Name="Uninstall $(var.ProductName)"
Description="..."
Target="[System64Folder]msiexec.exe"
Arguments="/x [ProductCode]"/>
<RemoveFolder Id="SERVERLOCATION" On="uninstall"/>
<RegistryValue
Root="HKCU"
Key="Software\$(var.Manufacturer)\$(var.ProductName)"
Name="installed"
Type="integer"
Value="1"
KeyPath="yes"/>
</Component>
</DirectoryRef>
Làm cách nào để khắc phục sự cố này?
Lưu ý phụ, quyền đăng ký giống nhau trên Windows XP và Windows 7 máy tính.
Tôi có thể tìm thấy nơi các mục nhập Registry đang diễn ra. Họ đang thực sự được đặt dưới Wow6432Node. Có cách nào để đặt nó dưới Khóa đăng ký phần mềm thông thường thay vì Software \ Wow6432Node không? –