[CMake] CPack NSIS RequestExecutionLevel

Eric Noulard eric.noulard at gmail.com
Fri Dec 16 04:45:56 EST 2011


2011/12/16  <rpf at gmx.li>:
> Hi everyone,
>
> I am compiling an installer for Windows 7 using CPack + NSIS.
> I need to pass the extra option
>
> RequestExecutionLevel user
>
> to NSIS. Does anyone know how to do this? The only way proposed somewhere on the net was to use
>
> set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "RequestExecutionLevel user")
>
> but that raises an error in NSIS (Error: command RequestExecutionLevel not valid in Section).
>
> Any help is greatly appreciated

Yes you can copy/paste the
Modules/NSIS.template.in
in your own project and add
"RequestExecutionLevel user"
at the appropriate place in this file.

Then update CMAKE_MODULE_PATH in order to add your project specific path
to make CMake/CPack use your own copy of NSIS.template.in.

Note that may specifiying RequestExecutionLevel in NSIS is of general interest
so that it's worth a feature request for CPack NSIS.

May be you could add some comment about that on a related bug:
http://public.kitware.com/Bug/view.php?id=11285
or create a new entry
-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list