Archive: RequestExecutionLevel & Vista


RequestExecutionLevel & Vista
Reading through the help for NSIS it states that Vista already detect NSIS installers and decides that admin privileges are needed. Does this mean we can forgo adding RequestExecutionLevel to the script?


Sort of, your installer will be treated as a legacy installer (whatever that means)

no harm in adding RequestExecutionLevel admin


Okay, I've been Vista'd and could use some help. I am trying to copy some font files into C:\Windows\Fonts and have had no success. I placed the following code in my .nsi file, using UAC_AdminOnly.nsi as a guide. I got that particular code by following the link to a zip file in nsis.sourceforge.net/UAC_plug-in.

First line in my .nsi file:
RequestExecutionLevel user
...
!include UAC.nsh
...
!define fontsDir "C:\Windows\Fonts"
Section "MainSection" SEC0
Rename $INSTDIR\qcsans.ttf ${fontsDir}\myFont.ttf
Rename $INSTDIR\my_bold.ttf ${fontsDir}\my_bold.ttf
SectionEnd

Function .onInit
${UAC.I.Elevate.AdminOnly}
FunctionEnd

Function .OnInstFailed
${UAC.Unload}
FunctionEnd

Function .OnInstSuccess
${UAC.Unload}

FunctionEnd

Not only are the font files not copied into the folder but, when I try to uninstall, I now get the error message Could not write update <MYENV> to HKLM. Could someone please shed some light on how to solve this?


why are you using the UAC plugin?

Search for fonts on the wiki for sample code


Forgive my ignorance but I searched http://nsis.sourceforge.net/Category:Code_Examples which led me to http://nsis.sourceforge.net/Category:Plugins in which the only reference to fonts was the FontName plugin. This does not appear to do what I need, which is to install the fonts. Am I missing something obvious?


For clarification, since the URLs were cleaned up in my previous post:
nsis.sourceforge.net/Category:Code_Examples led me to nsis.sourceforge.net/Category:Plugins