[wix-users] Running the application (not the MSI) as administrator

Rob Mensching rob at firegiant.com
Tue Dec 31 08:59:50 PST 2019

Put your log file somewhere else. Trying to write to the application folder is anti-security since ~2006.

-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Zac Harvey via wix-users
Sent: Tuesday, December 31, 2019 8:51 AM
To: wix-users at lists.wixtoolset.org
Cc: Zac Harvey <zharvey at pobox.com>
Subject: [wix-users] Running the application (not the MSI) as administrator

I am very pleased (so thank you!) with how easy WiX 3.11.2 has been to setup and use. I am a Mac/Linux developer that had a rare project crop up that required me to write a Windows application and MSI installer, and WiX has been a joy to work with thus far.

I have my MSI installed correctly installing my application under C:\Program Files (x86)\My App. And when it starts up it works perfectly, *except* one small item:

The app *should* be created a log file in that same directory (so C:\Program Files (x86)\My App\my-app.log). I noticed that although my app starts up and runs just fine (from the end user's perspective), the log file is not created.

So I right-clicked the EXE (C:\Program Files (x86)\My App\my-app.exe) and flagged it to *Run as administrator*, and that seemed to solve the problem. Now, when the app starts up, the log file is created and is written to as expected; all is well.

Its not a *huge* inconvenience to setting this "Run as administrator" flag manually, but ideally, the MSI installer would handle this for me. I came across this article:


...but I think that is for making the MSI installer itself run as the administrator, and I'm not entirely sure thats what I want (is it?). Again, the MSI runs great, its just that at start time, my *app* (not the installer) needs to run as the admin.

Can anyone weigh in as to what I need to do (specifically which commands added to which file) to get my (MSI-installed) app running as administrator?

Thanks for such a great tool, and Happy New Year!


WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

More information about the wix-users mailing list