Skip to content
⌘ NSIS Forum Archive

Strange path

2 posts

plamen#

Strange path

If we have:

InstallDir "$PROGRAMFILES\path_to_application\app_name"

and write

CreateDirectory "A:\$INSTDIR\sub_dir"

we end with this:

A:\C\Program Files\path_to_application\sub_....

---^

drive becomes path without error. Is that correct?
Anders#
$PROGRAMFILES contains the full path including drive so $INSTDIR does aswell, you can use strcpy to copy $INSTDIR into a temp variable removing the first 3 chars (strcpy $0 "$instdir" "" 3) you might want to add some code to check that the second character in the $instdir string is : before you do the copy