|
46 | 46 | <Property Id="ARPNOREPAIR" Value="yes" Secure="yes" /> <!-- Remove repair --> |
47 | 47 | <SetProperty Id="ARPNOMODIFY" Value="1" After="InstallValidate" Sequence="execute"/> |
48 | 48 |
|
| 49 | + <!-- initialize with previous InstallDir --> |
| 50 | + <Property Id="INSTALLDIR"> |
| 51 | + <RegistrySearch Id="PrevInstallDirReg" Root="HKCU" Key="Software\\{{{manufacturer}}}\\{{{product_name}}}" Name="InstallDir" Type="raw"/> |
| 52 | + </Property> |
| 53 | + |
49 | 54 | <!-- launch app checkbox --> |
50 | 55 | <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch {{{product_name}}}" /> |
51 | 56 | <Property Id="WixShellExecTarget" Value="{{{app_exe_source}}}" /> |
|
79 | 84 | <Component Id="ApplicationShortcutDesktop" Guid="*"> |
80 | 85 | <Shortcut Id="ApplicationDesktopShortcut" Name="{{{product_name}}}" Description="Runs {{{product_name}}}" Target="[!Path]" WorkingDirectory="INSTALLDIR" /> |
81 | 86 | <RemoveFolder Id="DesktopFolder" On="uninstall" /> |
82 | | - <RegistryValue Root="HKCU" Key="Software\\{{{product_name}}}" Name="installed" Type="integer" Value="1" KeyPath="yes" /> |
| 87 | + <RegistryValue Root="HKCU" Key="Software\\{{{manufacturer}}}\\{{{product_name}}}" Name="Desktop Shortcut" Type="integer" Value="1" KeyPath="yes" /> |
83 | 88 | </Component> |
84 | 89 | </Directory> |
85 | 90 | <Directory Id="$(var.PlatformProgramFilesFolder)" Name="PFiles"> |
|
91 | 96 | </Directory> |
92 | 97 |
|
93 | 98 | <DirectoryRef Id="INSTALLDIR"> |
| 99 | + <Component Id="RegistryEntries" Guid="*"> |
| 100 | + <RegistryKey Root="HKCU" Key="Software\\{{{manufacturer}}}\\{{{product_name}}}"> |
| 101 | + <RegistryValue Name="InstallDir" Type="string" Value="[INSTALLDIR]" KeyPath="yes" /> |
| 102 | + </RegistryKey> |
| 103 | + </Component> |
94 | 104 | <Component Id="Path" Guid="{{{path_component_guid}}}" Win64="$(var.Win64)"> |
95 | 105 | <File Id="Path" Source="{{{app_exe_source}}}" KeyPath="yes" Checksum="yes"/> |
96 | 106 | </Component> |
|
122 | 132 | <RemoveFolder Id="INSTALLDIR" |
123 | 133 | On="uninstall" /> |
124 | 134 |
|
125 | | - <RegistryValue Root="HKCR" |
| 135 | + <RegistryValue Root="HKCU" |
126 | 136 | Key="Software\\{{{manufacturer}}}\\{{{product_name}}}" |
127 | | - Name="installed" |
| 137 | + Name="Uninstaller Shortcut" |
128 | 138 | Type="integer" |
129 | 139 | Value="1" |
130 | 140 | KeyPath="yes" /> |
|
139 | 149 | Target="[!Path]" |
140 | 150 | Icon="ProductIcon" |
141 | 151 | WorkingDirectory="INSTALLDIR"> |
142 | | - <ShortcutProperty Key="System.AppUserModel.ID" Value="{{{manufacturer}}}"/> |
| 152 | + <ShortcutProperty Key="System.AppUserModel.ID" Value="{{{bundle_id}}}"/> |
143 | 153 | </Shortcut> |
144 | 154 | <RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/> |
145 | | - <RegistryValue Root="HKCU" Key="Software\\{{{manufacturer}}}\\{{{product_name}}}" Name="installed" Type="integer" Value="1" KeyPath="yes"/> |
| 155 | + <RegistryValue Root="HKCU" Key="Software\\{{{manufacturer}}}\\{{{product_name}}}" Name="Start Menu Shortcut" Type="integer" Value="1" KeyPath="yes"/> |
146 | 156 | </Component> |
147 | 157 | </DirectoryRef> |
148 | 158 |
|
|
166 | 176 | Display="expand" |
167 | 177 | Absent="disallow"> |
168 | 178 |
|
| 179 | + <ComponentRef Id="RegistryEntries"/> |
| 180 | + |
169 | 181 | {{#each resource_file_ids as |resource_file_id| ~}} |
170 | 182 | <ComponentRef Id="{{ resource_file_id }}"/> |
171 | 183 | {{/each~}} |
|
0 commit comments