Skip to content
⌘ NSIS Forum Archive

determine and take action based on path exe is run from

3 posts

gieltje#

determine and take action based on path exe is run from

How can I determine the path the .exe is run from ($exedir), and if it is run from c:\1\ then goto a: and if it is ran from somewhere else goto b:?

This would be realy apreceated.
Afrow UK#
To get the drive from $EXEDIR, use StrCpy $R0 $EXEDIR 1.
At this point $R0 is e.g. "C"

-Stu
gieltje#edited
Got iT: StrCmp $exedir c:\whatever goto_match dont_match

That does the trick!