Archive: Trouble writing files to installation directory


Trouble writing files to installation directory
I'm implementing a simple audio editor. On my XP-Home-Sp2 development computer, I'm having problems writing files to the installation directory and its subdirectories:
C:\Program Files\CleanSpeech\cleaned

This installation goes fine. Also, the main app can write to $INSTDIR\cleaned. The problem is when a console app is invoked by the main application that writes to $INSTDIR\cleaned. This fails for some reason. The invoked console app can write to other non-system directories with no problems.

I use the NSIS command
CreateDirectory $INSTDIR\cleaned
to create the directory.

Is there something special or protected about this $INSTDIR directory? When I look at its attributes, I see the ReadOnly box with solid colors. It isn't cleared or checked, but solid. When I clear it, the next time I look, it is back to solid again. My impression is that this means some files are read-only, and some aren't.

Is there somewhat to allow this installation directory to be written to by an invoked console app? Does this problem not occur with Win2000 and Win9x?


Does your console app not like paths with spaces in them. Maybe try c:\progra~1\... You can use the line below to determine the short path.

GetFullPathName /SHORT $R1 "$INSTDIR\cleaned"


That looks to be it. Should have thought of that possibility.

THANKS!