Old 21st February 2013, 18:21   #1
ajvpr
Junior Member
 
Join Date: Feb 2013
Posts: 2
Get INSTDIR folder name

I'm trying to somehow get just the folder name for the chosen install directory. I know that $INSTDIR contains the full path to the install directory but I would like just the folder name for that.

Example:

$INSTDIR = "C:\Program Files\MyProgram"

I want: "MyProgram"
ajvpr is offline   Reply With Quote
Old 21st February 2013, 19:51   #2
ajvpr
Junior Member
 
Join Date: Feb 2013
Posts: 2
Just found the answer, putting it up for reference:

http://nsis.sourceforge.net/Docs/AppendixE.html

!include "FileFunc.nsh"
${GetBaseName} "[FileString]" $var
ajvpr 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