Archive: Default Install Directory


Default Install Directory
Hi guys,

I'm back again.

I have a little problem concerning the default install directory.

I set this to E:\TEMP, but when the user wants to change this to (for example) D:\TEST, the script takes the path as D:\TEST\TEMP.

Is there any way that this little bug can be solved?

Here's the code.



;--------------------------------

; The name of the installer
Name "Upgrade Local Web v.4.0 to v.4.1"

; The file to write
OutFile "setup.exe"

; The default installation directory
InstallDir E:\TEMP

AllowRootDirInstall true
AutoCloseWindow true


;--------------------------------

; Pages

Page directory
Page instfiles

;--------------------------------

; The stuff to install
Section "" ;No components page, name is not important

; Set output path to the installation directory.
SetOutPath $INSTDIR


; Put file there
Delete $INSTDIR\firmware\9005-10515\language\B0705350B.exe
Delete $INSTDIR\firmware\9005-10515\language\B0705350B.pdf
Delete $INSTDIR\firmware\9005-10515\NET%20File\B0705776.exe
Delete $INSTDIR\firmware\9005-10515\NET%20File\B0705776.pdf

Delete $INSTDIR\firmware\9005-10515\NIB\B0705775.exe
Delete $INSTDIR\firmware\9005-10515\NIB\B0705775.pdf
Delete $INSTDIR\firmware\9005-10515\Scanner\B5806521.exe
Delete $INSTDIR\firmware\9005-10515\Scanner\B5806521.pdf
CopyFiles $EXEDIR\*.* $INSTDIR
Delete $INSTDIR\setup.exe


SectionEnd ; end the section


I'm also wondering if the code I put in RED will work fine. I want to put a space between NET and File, but the script doesn't accept this. Maybe with %20?


Re: Default Install Directory

Originally posted by DBE
I'm also wondering if the code I put in RED will work fine. I want to put a space between NET and File, but the script doesn't accept this. Maybe with %20?
...maybe with quotation marks? ;)

Append a backslash to the value you pass to InstallDir. See the documentation for InstallDir for more information.

If you want to use spaces, you should quote the parameter.