Thread: Path
View Single Post
Old 22nd November 2011, 09:42   #12
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
Quote:
Originally Posted by sethradio View Post
I know I shouldn't use nsis string functions to edit the pah variable at this point. But for the sake of it, how could you use string function to find the install path?
You don't have to.

At install time, simply save your $INSTDIR to some (unique) registry key of your own.

At un-install time, read that registry key. No string manipulations will be required.

And, as on Windows the MAX_PATH is 260, the 1024 characters of an NISIS string are sufficient - for a single path.

(Actually the uninstaller will already have $INSTDIR set to the path it was started from)

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR is offline   Reply With Quote