You are here

[Fixed] PA.c Installer 3.4.2 won't browse last used directory

4 posts / 0 new
Last post
mwayne
Offline
Last seen: 18 hours 44 min ago
Developer
Joined: 2012-01-03 09:23
[Fixed] PA.c Installer 3.4.2 won't browse last used directory

I found the source of a thing bugging me since ver 3.4. According to the docs you can define an initial selection:
nsDialogs::SelectFolderDialog title initial_selection

So this should fix it but I can't verify because I can't compile it Smile
It's in line 241:
nsDialogs::SelectFolderDialog /NOUNLOAD "Directory" $INSTALLAPPDIRECTORY

John T. Haller
John T. Haller's picture
Offline
Last seen: 5 hours 18 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Wasn't Working

The last time I checked, it wasn't working properly.

Personally, I define it as a Send To on my system and never even use the installer UI.

Sometimes, the impossible can become possible, if you're awesome!

mwayne
Offline
Last seen: 18 hours 44 min ago
Developer
Joined: 2012-01-03 09:23
Ok Nevermind

Thanks for the hint it really comes in handy.

John T. Haller
John T. Haller's picture
Offline
Last seen: 5 hours 18 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Added in 3.4.3

The code to do it required using the NSD_ directives. I also added a fallback to the parent directory as most of us keep apps in similar locations. So, if you're working on something in PlaceIStoreStuff\AppName1 and then delete AppName1, it will fallback to PlaceIStoreStuff when you browse.

${NSD_GetText} $dirrequestOptions $0
	${IfNot} ${FileExists} "$0\*.*"
		${GetParent} $0 $0
		${IfNot} ${FileExists} "$0\*.*"
			StrCpy $0 $EXEDIR
		${EndIf}
	${EndIf}
	nsDialogs::SelectFolderDialog /NOUNLOAD "Directory" $0

Sometimes, the impossible can become possible, if you're awesome!

Log in or register to post comments