Skip to content
⌘ NSIS Forum Archive

Confused $INSTDIR

6 posts

stonkers#edited

Confused $INSTDIR

I just compiled an installer with this code:


;NSIS Script For This App

;Backgound Colors
BGGradient 800080 000000 FFFFFF
BrandingText " "

;Title Of Your Application
Name "Title"

;Do A CRC Check
CRCCheck On

;Included file(s)
!include servicelib.nsh

;Output File Name
OutFile ${OUT_FILE}

;The Default Installation Directory
InstallDir "D:\Program Files\App"

;The text to prompt the user to enter a directory
DirText "Please select the folder below"

Section "Install"

LogSet On

;Install Files
SetOutPath $INSTDIR
SetCompress Auto
SetOverwrite on
File /r ".\Deploy\*.*"
...there's more code, but this is where it chokes.
When the "File /r" is run, it's acting like the INSTDIR is 393444. It's giving the error: "Error for opening file for writing: 393444\myDir\filename.fileextenstion".

I'm going to run the build and recompile the nsi file without doing anything differently expecting different results (definition of insanity?), but thought I'd post since it happened.

Thanks,
Eric

BTW - where I'm installing it isn't where Kichik had me put windbg and such...
stonkers#
ding ding ding ding, the stubs you gave me. I'm running the logging NSIS, were those stubs for a different version? Do you have the same changes in stubs for the logging version? Our deployments would all fail without the logging version...
kichik#
Attached are stubs for 2.31 (won't work with 2.25) with logging. Building that for 2.25 is possible, but it'd take more time and upgrading is good anyway 🙂

I haven't said this before, but you shouldn't use this for anything else but testing.
stonkers#
Thanks Kichik, I'll upgrade and only use the test stubs directory when I compile the installer for testing.