Skip to content

Commit cfdb8ef

Browse files
committed
WiX: Separate shortcuts into individual components with registry KeyPaths
- Split PC_Shortcuts component into individual components per shortcut - Each shortcut now has its own Component with Guid="*" for auto-generation - Added unique registry KeyPaths for each shortcut component - Created separate PC_Registry component for general registry values - Follows pattern from generic-DataLab.wxs for consistency
1 parent 1328b99 commit cfdb8ef

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

wix/generic-DataLab-WinPython.wxs

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,33 @@
3535
<File Source=".\dist\DataLab-WinPython\WinPython Interpreter.exe" KeyPath="no" />
3636
</Component>
3737
<!-- Automatically inserted components -->
38-
<Component Id="PC_Shortcuts" Directory="ApplicationProgramsFolder" Guid="97d16267-1153-4e59-8c9f-d3b806a03be2">
39-
<Shortcut Id="ApplicationStartMenuShortcut" Name="DataLab" Description="DataLab" Target="[INSTALLFOLDER]\DataLab.exe" WorkingDirectory="INSTALLFOLDER" />
38+
<!-- Shortcut components: one component per shortcut with registry KeyPath -->
39+
<Component Id="PC_Shortcut_Main" Directory="ApplicationProgramsFolder" Guid="*">
40+
<Shortcut Id="ApplicationStartMenuShortcut" Name="DataLab" Description="DataLab" Target="[INSTALLFOLDER]\DataLab.exe" WorkingDirectory="INSTALLFOLDER" Icon="DataLab.exe" />
41+
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Name="shortcut_main" Type="integer" Value="1" KeyPath="yes" />
42+
<RemoveFolder Id="RemoveApplicationProgramsFolder1" Directory="ApplicationProgramsFolder" On="uninstall" />
43+
</Component>
44+
<Component Id="PC_Shortcut_Reset" Directory="ApplicationProgramsFolder" Guid="*">
4045
<Shortcut Id="ResetApplicationStartMenuShortcut" Name="Reset DataLab" Description="Resets DataLab configuration" Target="[INSTALLFOLDER]\DataLab.exe" Arguments="--reset" WorkingDirectory="INSTALLFOLDER" Icon="DataLabResetIcon" />
46+
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Name="shortcut_reset" Type="integer" Value="1" KeyPath="yes" />
47+
<RemoveFolder Id="RemoveApplicationProgramsFolder2" Directory="ApplicationProgramsFolder" On="uninstall" />
48+
</Component>
49+
<Component Id="PC_Shortcut_CommandPrompt" Directory="ApplicationProgramsFolder" Guid="*">
4150
<Shortcut Id="ApplicationStartMenuShortcut01" Name="DataLab-WinPython Command Prompt" Description="DataLab-WinPython Command Prompt" Target="[INSTALLFOLDER]\WinPython Command Prompt.exe" WorkingDirectory="INSTALLFOLDER" />
51+
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Name="shortcut_cmdprompt" Type="integer" Value="1" KeyPath="yes" />
52+
<RemoveFolder Id="RemoveApplicationProgramsFolder3" Directory="ApplicationProgramsFolder" On="uninstall" />
53+
</Component>
54+
<Component Id="PC_Shortcut_ControlPanel" Directory="ApplicationProgramsFolder" Guid="*">
4255
<Shortcut Id="ApplicationStartMenuShortcut02" Name="DataLab-WinPython Control Panel" Description="DataLab-WinPython Control Panel" Target="[INSTALLFOLDER]\WinPython Control Panel.exe" WorkingDirectory="INSTALLFOLDER" />
43-
<Shortcut Id="UninstallProductShortcut" Name="Uninstall DataLab" Description="Uninstalls DataLab" Target="[System64Folder]msiexec.exe" Arguments="/x [ProductCode]" WorkingDirectory="INSTALLFOLDER" />
44-
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall" />
56+
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Name="shortcut_controlpanel" Type="integer" Value="1" KeyPath="yes" />
57+
<RemoveFolder Id="RemoveApplicationProgramsFolder4" Directory="ApplicationProgramsFolder" On="uninstall" />
58+
</Component>
59+
<Component Id="PC_Shortcut_Uninstall" Directory="ApplicationProgramsFolder" Guid="*">
60+
<Shortcut Id="UninstallProductShortcut" Name="Uninstall DataLab" Description="Uninstalls DataLab" Target="[System64Folder]msiexec.exe" Arguments="/x [ProductCode]" WorkingDirectory="INSTALLFOLDER" Icon="DataLab.exe" />
61+
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Name="shortcut_uninstall" Type="integer" Value="1" KeyPath="yes" />
62+
<RemoveFolder Id="RemoveApplicationProgramsFolder5" Directory="ApplicationProgramsFolder" On="uninstall" />
63+
</Component>
64+
<Component Id="PC_Registry" Directory="INSTALLFOLDER" Guid="*">
4565
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Name="installed" Type="integer" Value="1" KeyPath="yes" />
4666
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Name="InstallFolder" Type="string" Value="[INSTALLFOLDER]" />
4767
<util:RemoveFolderEx On="both" Property="REMOVEPROP" />

0 commit comments

Comments
 (0)