Ho scritto un programma di installazione WiX che funziona perfettamente con Windows XP, ma quando si installa su un Windows 7 sono in difficoltà con le voci del registro. Devo aggiungere una voce HKLM e la voce di registro per il programma da mostrare nel menu di avvio. Ecco il codice che sto utilizzando per entrambi i tipi di immissione:WiX non aggiungerà l'impostazione del registro HKLM durante l'installazione di Windows 7
<!-- 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>
Come posso risolvere questo problema?
Su una nota a margine, le autorizzazioni di registro sono le stesse sui computer Windows XP e Windows 7.
Sono stato in grado di trovare dove stavano andando le voci del Registro di sistema. In realtà vengono posizionati sotto il Wow6432Node. C'è un modo per farlo posizionare sotto la normale chiave del Registro di sistema anziché in Software \ Wow6432Node? –