Wix Burn Bundle - must be an administrator

I created the WIX Burn Bundle. In Bundle I install .Net 4 (if it is not installed), then another 2.msi file. 1 is the third part of msi, the other is msi, which I created for my software using WIX. I need to be an administrator on a computer to run these .msi files.

I want the Burn package to do nothing if the user is not an administrator, that is, does not install anything. In my software, I can easily do this using the below - however, I cannot do this in a bundle. I read a lot of similar posts, but just did not find a working example for what I want to do.

<CustomAction Id="IsPrivileged" Error="You must be an Administrator to install [ProductName]." /> <InstallExecuteSequence> <Custom Action='IsPrivileged' Before='LaunchConditions'> Not Privileged </Custom> </InstallExecuteSequence> 
+6
source share
1 answer

You can use the pool equivalent at startup using Built-in Variables and the WixBalExtension Status Element

 <bal:Condition Message="You can't elevate."> <![CDATA[Privileged <> 0]]> </bal:Condition> <bal:Condition Message="You're not elevated."> WixBundleElevated = 1 </bal:Condition> 
+8
source

Source: https://habr.com/ru/post/952213/


All Articles