Old 2nd November 2007, 00:44   #1
Boneyhead
Junior Member
 
Join Date: Nov 2007
Posts: 12
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?
Boneyhead is offline   Reply With Quote
Old 2nd November 2007, 01:16   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,332
Sort of, your installer will be treated as a legacy installer (whatever that means)

no harm in adding RequestExecutionLevel admin

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 10th June 2009, 02:09   #3
abcdgoldfish
Junior Member
 
Join Date: Jan 2009
Posts: 35
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?
abcdgoldfish is offline   Reply With Quote
Old 10th June 2009, 09:46   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,332
why are you using the UAC plugin?

Search for fonts on the wiki for sample code

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 12th June 2009, 20:05   #5
abcdgoldfish
Junior Member
 
Join Date: Jan 2009
Posts: 35
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?
abcdgoldfish is offline   Reply With Quote
Old 12th June 2009, 20:07   #6
abcdgoldfish
Junior Member
 
Join Date: Jan 2009
Posts: 35
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
abcdgoldfish is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump