|
12 | 12 | failed to link for some reason. |
13 | 13 | --> |
14 | 14 | <Fragment> |
15 | | - <!-- Read the configurator exe path persisted to the registry during |
16 | | - install. AppSearch runs early in every session (install, uninstall, |
17 | | - repair) so the property is available when custom actions fire. |
18 | | - This is critical for uninstall: the Directory-table default for |
19 | | - INSTALL_ROOT may revert to the compile-time default, but this |
20 | | - property always reflects the ACTUAL installed location. --> |
21 | | - <Property Id="SEEKDB_CONFIGURATOR_EXE"> |
22 | | - <RegistrySearch Id="FindConfiguratorExe" Root="HKLM" |
23 | | - Key="Software\SeekDB" Name="ConfiguratorExe" Type="raw" /> |
24 | | - </Property> |
25 | | - |
26 | 15 | <!-- Wire the ExitDialog's Finish button to fire LaunchApplication |
27 | 16 | when the checkbox is checked. WixUI shows the checkbox but |
28 | 17 | does NOT include this Publish by default — we must add it. |
|
33 | 22 | Condition="WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed" /> |
34 | 23 | </UI> |
35 | 24 |
|
36 | | - <!-- Type 34 custom action: fire-and-forget launch of Configurator (install). |
37 | | - During install [INSTALL_ROOT] is always correctly resolved by the |
38 | | - session, so Type 34 (Directory + ExeCommand) works fine here. --> |
| 25 | + <!-- Type 34 custom action: fire-and-forget launch of Configurator (install). --> |
39 | 26 | <CustomAction Id="LaunchApplication" |
40 | 27 | Directory="INSTALL_ROOT" |
41 | 28 | ExeCommand=""[INSTALL_ROOT]bin\seekdbConfigurator.exe"" |
42 | 29 | Execute="immediate" |
43 | 30 | Return="asyncNoWait" /> |
44 | 31 |
|
45 | | - <!-- Type 50 custom action: launch Configurator in remove mode (uninstall). |
46 | | - Uses the SEEKDB_CONFIGURATOR_EXE property (populated from the |
47 | | - registry by AppSearch) so the correct path is resolved even when |
48 | | - the user chose a non-default install directory. Type 34 with |
49 | | - Directory="INSTALL_ROOT" failed in that scenario because the |
50 | | - directory property could revert to its default value during |
51 | | - uninstall, pointing to a non-existent path. |
| 32 | + <!-- Type 34 custom action: launch Configurator in remove mode (uninstall). |
| 33 | + Runs synchronously so removal completes before MSI deletes files. |
52 | 34 | Return="ignore" ensures uninstall proceeds even if user cancels. --> |
53 | 35 | <CustomAction Id="RunConfiguratorRemove" |
54 | | - Property="SEEKDB_CONFIGURATOR_EXE" |
55 | | - ExeCommand="--remove" |
| 36 | + Directory="INSTALL_ROOT" |
| 37 | + ExeCommand=""[INSTALL_ROOT]bin\seekdbConfigurator.exe" --remove" |
56 | 38 | Execute="immediate" |
57 | 39 | Return="ignore" /> |
58 | 40 |
|
59 | 41 | <!-- Schedule the removal configurator before files are deleted. |
60 | 42 | Only runs on full uninstall (not upgrades). --> |
61 | 43 | <InstallExecuteSequence> |
62 | 44 | <Custom Action="RunConfiguratorRemove" Before="RemoveFiles" |
63 | | - Condition="(REMOVE="ALL") AND (NOT UPGRADINGPRODUCTCODE) AND SEEKDB_CONFIGURATOR_EXE" /> |
| 45 | + Condition="(REMOVE="ALL") AND (NOT UPGRADINGPRODUCTCODE)" /> |
64 | 46 | </InstallExecuteSequence> |
65 | 47 |
|
66 | 48 | <!-- Add bin/ to system PATH (cleanly removed on uninstall). --> |
|
70 | 52 | Permanent="no" Part="last" Action="set" System="yes" /> |
71 | 53 | <RegistryValue Root="HKLM" Key="Software\SeekDB" Name="PathConfigured" |
72 | 54 | Type="integer" Value="1" KeyPath="yes" /> |
73 | | - <RegistryValue Root="HKLM" Key="Software\SeekDB" Name="InstallRoot" |
74 | | - Type="string" Value="[INSTALL_ROOT]" /> |
75 | | - <RegistryValue Root="HKLM" Key="Software\SeekDB" Name="ConfiguratorExe" |
76 | | - Type="string" Value="[INSTALL_ROOT]bin\seekdbConfigurator.exe" /> |
77 | 55 | </Component> |
78 | 56 | </DirectoryRef> |
79 | 57 | </Fragment> |
|
0 commit comments