Development discussion of WireGuard
 help / color / mirror / Atom feed
* [PATCH] DO_NOT_LAUNCH parameter was ignored by MSI, should work now
@ 2020-02-24 13:32 Arjen Brouwer
  2020-02-27 11:40 ` Simon Rozman
  0 siblings, 1 reply; 2+ messages in thread
From: Arjen Brouwer @ 2020-02-24 13:32 UTC (permalink / raw)
  To: wireguard; +Cc: Arjen Brouwer

From: Arjen Brouwer <arjen@ag5.nl>


The `DO_NO_LAUNCH` parameter did not actually work. After running the installer with the DO_NO_LAUNCH parameter, the UI still showed up afterwards and the MSI log had the following entry:

```
MSI (c) (28:08) [14:43:17:966]: Ignoring disallowed property DO_NOT_LAUNCH
```

By explicitly defining the DO_NOT_LAUNCH property and making it secure, solved the problem.

---
 installer/wireguard.wxs | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/installer/wireguard.wxs b/installer/wireguard.wxs
index 5bbb1eb..781d20c 100644
--- a/installer/wireguard.wxs
+++ b/installer/wireguard.wxs
@@ -45,7 +45,8 @@
 		<Property Id="DISABLEROLLBACK" Value="yes" />
 		<Property Id="MSIDISABLERMRESTART" Value="1" />
 		<Property Id="MSIRMSHUTDOWN" Value="1" />
-
+		<Property Id="DO_NOT_LAUNCH" Value="0" Secure="yes" />
+		
 		<!--
 			Upgrading
 		-->
@@ -135,7 +136,7 @@
 		-->
 		<CustomAction Id="LaunchApplication" HideTarget="yes" Impersonate="no" Execute="deferred" FileKey="wireguard.exe" ExeCommand="" Return="asyncNoWait" />
 		<InstallExecuteSequence>
-			<Custom Action="LaunchApplication" Before="InstallFinalize">(&amp;WireGuardFeature = 3) AND NOT DO_NOT_LAUNCH</Custom>
+			<Custom Action="LaunchApplication" Before="InstallFinalize"><![CDATA[(&WireGuardFeature = 3) AND (DO_NOT_LAUNCH = "0")]]></Custom>
 		</InstallExecuteSequence>
 
 		<!--
@@ -143,7 +144,7 @@
 		-->
 		<CustomAction Id="LaunchApplicationAsOrdinaryUser" HideTarget="yes" FileKey="wireguard.exe" ExeCommand="" Return="asyncNoWait" />
 		<InstallExecuteSequence>
-			<Custom Action="LaunchApplicationAsOrdinaryUser" After="InstallFinalize">(&amp;WireGuardFeature = -1) AND (!WireGuardFeature = 3) AND NOT DO_NOT_LAUNCH</Custom>
+			<Custom Action="LaunchApplicationAsOrdinaryUser" After="InstallFinalize"><![CDATA[(&WireGuardFeature = -1) AND (!WireGuardFeature = 3) AND (DO_NOT_LAUNCH = "0")]]></Custom>
 		</InstallExecuteSequence>
 	</Product>
 </Wix>
-- 
2.24.1.windows.2

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-27 11:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-24 13:32 [PATCH] DO_NOT_LAUNCH parameter was ignored by MSI, should work now Arjen Brouwer
2020-02-27 11:40 ` Simon Rozman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).