Old 27th October 2006, 00:03   #1
w9hly
Junior Member
 
Join Date: Oct 2006
Location: Indiana
Posts: 5
how to avoid adding product name to the end of the path

I have my product name attached to the path when using browse button to choose folder to install to. Found the note below but can't find a way of using it im my installer. Very new to NSIS. Attached is my .nsi file. Hints?

Function .onInit
; Must set $INSTDIR here to avoid adding ${MUI_PRODUCT} to the end of the
; path when user selects a new directory using the 'Browse' button.
StrCpy $INSTDIR "$PROGRAMFILES\${MUI_PRODUCT}"
FunctionEnd

Thank you, Varn
w9hly is offline   Reply With Quote
Old 27th October 2006, 00:24   #2
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 916
You will probably need to use InstallDir with a backslash at the end of the path:
code:
InstallDir "$PROGRAMFILES\${MUI_PRODUCT}\"


[edit] The attachment is lost if you preview your post, so preview your reply until you are happy with it, then add your attachment and post the topic/reply.[/edit]

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 27th October 2006, 02:07   #3
w9hly
Junior Member
 
Join Date: Oct 2006
Location: Indiana
Posts: 5
Jason: The suggestion took care of the Product name at the end of the path. Thnaks! However, the data continues to be installed in the original folder, not the one chosen with the Browse button. I am attaching my .nis file if you care to view it.
Thank you, Vern
Attached Files
File Type: nsi fp upgrade.nsi (2.0 KB, 242 views)
w9hly is offline   Reply With Quote
Old 27th October 2006, 02:23   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
You set the output path to a very specific directory and not the directory the user chose with:
code:
SetOutPath "$PROGRAMFILES\FRUPAC NetWare"
You should use:
code:
SetOutPath $INSTDIR

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 27th October 2006, 02:53   #5
w9hly
Junior Member
 
Join Date: Oct 2006
Location: Indiana
Posts: 5
Smile

Fellow NSIS travelers: I love it. The response has been swift and terrific. Problem solved! Who would have thunk it in such short order. Needless to say, many many thanks.
w9hly 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