Skip to content

Commit feb3a8f

Browse files
authored
feat(bundler): configure WiX to add launch option, closes #3015 (#3043)
1 parent 151e629 commit feb3a8f

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

.changes/wix-run-app.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri-bundler": patch
3+
---
4+
5+
Configure WiX to add an option to launch the application after finishing setup.

tooling/bundler/src/bundle/windows/msi/wix.rs

+2
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,8 @@ fn run_light(
330330
let mut args: Vec<String> = vec![
331331
"-ext".to_string(),
332332
"WixUIExtension".to_string(),
333+
"-ext".to_string(),
334+
"WixUtilExtension".to_string(),
333335
"-o".to_string(),
334336
output_path.display().to_string(),
335337
];

tooling/bundler/src/bundle/windows/templates/main.wxs

+8
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,15 @@
4646
<Property Id="ARPNOREPAIR" Value="yes" Secure="yes" /> <!-- Remove repair -->
4747
<SetProperty Id="ARPNOMODIFY" Value="1" After="InstallValidate" Sequence="execute"/>
4848

49+
<!-- launch app checkbox -->
50+
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch {{{product_name}}}" />
51+
<Property Id="WixShellExecTarget" Value="{{{app_exe_source}}}" />
52+
<CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />
53+
4954
<UI>
55+
<!-- launch app checkbox -->
56+
<Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>
57+
5058
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
5159

5260
{{#unless license}}

0 commit comments

Comments
 (0)