Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add the RequestExecutionLevel option of NSIS to a CMakeLists.txt

I am trying to get an installer compiled with NSIS on Windows 7 to work without administrator privileges. The project is set up with CMake and compiled with VC2010. I have figured out that I have to use the

RequestExecutionLevel user

option. My question is: What do I have to put into my CMakeLists.txt to pass this option to NSIS? I found

set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "RequestExecutionLevel user")

somewhere on google, but that gives an error, saying that this option cannot be set in this section.

Any help is greatly appreciated

like image 912
Hans Avatar asked Sep 17 '25 11:09

Hans


1 Answers

The version of CMake that I have has @CPACK_NSIS_DEFINES@ in NSIS template, so adding set(CPACK_NSIS_DEFINES "RequestExecutionLevel user") to CMakeLists.txt does the job as well.

Although it may require extra work for component based install.

like image 187
mlt Avatar answered Sep 19 '25 06:09

mlt