Game requires "Run as Administrator"?

Dec 13, 2012 at 8:29 PM
Edited Dec 13, 2012 at 8:29 PM

For some reason my game won't run on computers unless the Run as Administrator box is checked, or you right click and Run as Admin...

I've googled for a way for WiX to automatically do this when it's installed but it seems like I need to do something with CustomActions and ShellExecute, however I can't find the answer I'm looking for. 

Can anyone shed some light on this issue?

Coordinator
Dec 14, 2012 at 8:02 AM

As far as I know, there's no way to suppress the UAC popup for an application that requires admin rights. In any case, you should fix your game, not hide the problem through the installer ;-)

If your game is asking for admin rights without your doing, it might be that its executable contains the words "setup" or "patch" in the filename.

If you mean your game starts, but runs into some error unless launched with administrative privileges, it's hard to track down without actually knowing the error. It may be that you're trying to write into a directory your game has no business accessing (such as "Program Files" or "Windows") or that you're trying to open a registry key under HKEY_LOCAL_MACHINE in read/write mode.