PDA

View Full Version : Destination Browse Bug


SFP Sonic
5th June 2002, 08:48
I've noticed an irritataing bug when chosing your destination on an NSIS installer. I explain what I see, to help you understand what is going on. I'm using an installer to add maps to the game BZ2. When I start up, it read C:\Program Files\Battlezone II. I would like to change the directory, so I hit browse. I browse through the file tree and chose D:\Games\bzii. When I hit ok, and go back to the Destination screen, my destination now reads: D:\games\bzii\Battlezone II

My guess is that its attaching the default path onto the user's selection. Can this be disabled?

Smile2Me
5th June 2002, 08:55
Yes, but you could try to avoid the dirselection page by reading the proper installdir from registry.

From the docs:
to disable this, end the directory with a \ (which will require the entire parameter to be enclosed with quotes).

I hope this helps.

Good luck,
-Hendri.


To be honest, my first answer was no, since I did not remember this option. To be sure, I looked into the docs again and found the answer. I was just a sec quicker with my edit than Schultz with his reply. Thx Schultz for keeping a close eye to the answers and correcting where necessary!

Schultz
5th June 2002, 09:02
This is directly from the NSIS docs

InstallDir definstdir

Sets the default installation directory is. See the variables section for variables that can be used to make this string (especially $PROGRAMFILES). Note that the part of this string following the last \ will be used if the user selects 'browse', and may be appended back on to the string at install time (to disable this, end the directory with a \ (which will require the entire parameter to be enclosed with quotes)). If this doesn't make any sense, play around with the browse button a bit.

SFP Sonic
6th June 2002, 00:03
Thanks for the response, problem with the regkey is that many people have multiple installs of bz2, and the regkey on keeps track of one. Once again, thanks.