Friday, 6 September 2013

NSIS Guidance: Customer issues with various UAC scenarios with my installer and program

NSIS Guidance: Customer issues with various UAC scenarios with my
installer and program

I'm a game developer releasing a desktop MMO game for all varieties of
Windows (WinXP, Vista, Win7, Win8 including X64 variants) that has a
general audience that ranges from tech savvy to non-tech savvy.
The game requires the ability to update itself at any time on a regular
basis which means it needs to be installed and configured on the
customer's machine with appropriate UAC privileges so it can update any
and all files that are installed including the executables themselves.
I have created an NSIS installer that is configured to run without admin
privileges (RequestExecutionLevel user) and installs the game (by default)
to $LOCALAPPDATA of the user so that that game does not require elevated
privileges to execute. The executables I install for my game are built
with a manifest that informs Windows it does not require elevated
privileges (this is to avoid the ugly shield icon and admin prompt each
and every time you try to play the game).
The original issue I have run into is as follows:
Customers are downloading the NSIS installer and then copying it to a
privileged location and the installer silently fails to run without any
prompt that it's not running since it runs without admin privilege.
As a temporary workaround, I've rebuilt the NSIS installer to run with
admin privilege, but, that opens up to potentially another problem where
the customer changes the default installation directory to a privileged
directory and then the game itself will fail to execute. As a temporary
workaround for THAT problem, I've disabled the ability to change the
default installation location until I can come up with a complete
solution.
An ideal solution that I can think of is a way to allow NSIS to run
normally, detect if it needs admin privileges and prompt at that point and
then disallow players from installing to elevated privileged locations.
I'm not experienced enough with NSIS to know if that is all possible.
Any guidance would be extremely appreciated!

No comments:

Post a Comment