[CMake] Using Cpack and NSIS to create installers for UAC-controlled directories under Windows Vista

Eric Noulard eric.noulard at gmail.com
Mon Jul 13 07:37:42 EDT 2009


2009/7/12 Linebarger, John <jmlineb at sandia.gov>:
> Hello!  I have a customer who is running 64-bit Windows Vista Ultimate SP2,
> and wants installers for 64-bit ParaView and OverView-branded applications.
> I am able to use NSIS to successfully build installers for 64-bit Windows
> Vista executables (although the installer itself is a 32-bit application
> because NSIS is 32-bit).
>
> However, I'm running into strange behavior actually installing the
> application under Vista, evidently due to UAC (User Access Controls).  I can
> install it into C:\Program Files or C:\Program Files (x86), but when I try
> to run the application, it crashes with a null pointer exception.  But when
> I install it into another directory, one that is not protected by UAC (like
> D:\Program Files or D:\Program Files (x86)), all is well--the application
> executes normally.  My guess is that the application is trying to write
> something relative to the install directory, and crashes because UAC is
> preventing it.
>
> In addition, when I try to build the install target for my executable in
> Visual Studio, it errors when I try to install it to a UAC-controlled
> directory, but does not error when I try to install it to a
> non-UAC-controlled directory.
>
> What facilities exist in CMake/Cpack/NSIS to tame the UAC beast under
> Vista?  I'd like for everything to "just work" exactly like it does under
> 32-bit Windows XP.  My guess is that there may be two levels of issues
> here--one that grants privileges that UAC respects at install time, and the
> other that grants such privileges at run time.

I think similar trouble already pops-up on the list:
http://www.cmake.org/pipermail/cmake/2008-August/023576.html
which points to NSIS Page:
http://nsis.sourceforge.net/UAC_plug-in

May be you can ask for follow-up on this, and may
be even write a CMake Wiki page when it's solved :-)

Good luck.

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list