I have written a WIX Installer using wixsharp that wraps a legacy installation procedure that used a batch file. When running the MSI as an non-admin I do get prompted to elevate (the UAC dialog) however the batch script is run as a non-admin
var project = new Project(string.Format("App");
project.Actions = new[] { new PathFileAction(@"C:\build\build_script.bat", args[1], @"C:\build\", Return.check, When.After, Step.InstallExecute, Condition.NOT_Installed, Sequence.InstallExecuteSequence) };
project.UI = WUI.WixUI_InstallDir;
One way around this is to start a command prompt as Administrator and run the MSI using msiexec - this works but is very clunky.
How can I make my PathFileAction
run as Administrator?