Archive: Install in the directory of installer


Install in the directory of installer
Hi all,

how can I set the $INSTDIR to the same
directory as the installer file is.

Example:
C:\downloads\myinstaller.exe
$INSTDIR = C:\downloads

It sould be the current path of the installer file.

Thanks
- timecop


Use the GetParent function to get the parent directory of any file. Finding the file is up to you. It can be done searching the hard disk, reading from the registry or any other file. If you need help figuring out how a certain way post back here and someone will surely be able to help.


Don't you mean:
$EXEDIR:


InstallDir "$EXEDIR"

;)

Very fast answer! Thanks.
Now, I was looking in the documentation and I think
InstallDir $EXEDIR
is the an easier way.


Installer, right, my bad. I thought it was another application.