w9hly
27th October 2006 01:03 UTC
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
JasonFriday13
27th October 2006 01:24 UTC
You will probably need to use InstallDir with a backslash at the end of the path:
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]
w9hly
27th October 2006 03:07 UTC
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
kichik
27th October 2006 03:23 UTC
You set the output path to a very specific directory and not the directory the user chose with:
SetOutPath "$PROGRAMFILES\FRUPAC NetWare"
You should use:
SetOutPath $INSTDIR
w9hly
27th October 2006 03:53 UTC
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.