You are here

new installer.nsi

1 post / 0 new
sgt-d
Offline
Last seen: 6 years 5 months ago
Joined: 2007-04-04 10:20
new installer.nsi

;original
DefaultDestination:
StrCpy $INSTDIR "\${SHORTNAME}"

in the above case if you run the exe it will setup an $INSTDIR like this:

\MyApp

which does not work by default - you have to "browse" to a folder first. it will install fine from the PortableApps Menu, but you can't just run the EXE from anywhere else without browsing.

;modified
DefaultDestination:
StrCpy $INSTDIR "$exedir\${SHORTNAME}"

in this modified code, it will install correctly under the PA Menu AND you can also run it from any location (without having to browse).

so, if this is your exe and location: c:\myapp.exe

double clicking would setup $INSTDIR like this:

C:\MyApp

-sgt