From 81d368da831802d5f2e8ce4b865219c15debde1f Mon Sep 17 00:00:00 2001 From: "Jan T. Sott" Date: Sat, 26 Mar 2016 13:50:50 +0100 Subject: [PATCH] add RequestExecutionLevel Windows Vista and later need administrator rights to write files to `$PROGRAMFILES` or or change the registry in `HKLM`. I assume the installer already claimed admin rights on launch, but it's recommended to explicitely do so. --- template_source/installer/win64.nsi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/template_source/installer/win64.nsi b/template_source/installer/win64.nsi index bd32f2d..ae7256c 100644 --- a/template_source/installer/win64.nsi +++ b/template_source/installer/win64.nsi @@ -20,6 +20,9 @@ OutFile "..\build\${APPNAME}-Setup-x64.exe" # Destintation install directory InstallDir "$PROGRAMFILES\${APPNAME}" +# Install as administrator +RequestExecutionLevel admin + # default section start Section @@ -86,4 +89,4 @@ Section "Uninstall" # Remove uninstaller information from the registry DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" -SectionEnd \ No newline at end of file +SectionEnd