Archive: Finding a specific folder


Finding a specific folder
Okay. . .NSIS newbie here. Looks like a very cool and powerful scripting language but I'm having trouble deciphering how it all works.

I want my installer to:


I've only gotten as far as the 'search for the path' part. I'm trying to have ${GetDrives} return all "HDD+NET" drives, and then use locate to search each drive for a directory name, and then stop if it finds a match and return the full path.

Any help greatly appreciated.

Okay, so I have locate working without GetDrives:


${locate::Open} "C:\" "/F=0 /D=1 /M=SomeDir" $0
${locate::Find} $0 $1 $2 $3 $4 $5 $6
MessageBox MB_OK 'SomeDirdir: $2'


Now how do I put up a "wait" type dialog while it searches? And how do I incorporate GetDrive in there?

I would just use DetailPrint to print "Please Wait" which will appear in the install log page or the status bar depending on your settings.

I speculate that there might be something that could be done with nsDialogs to show a dialog.

You could create a separate exe that just displays a dialog, but the difficult part to showing a dialog, is that you would have to first spawn the dialog asynchronously, so that your script would then continue and perform the locate, then once the locate statement completes, you would then need to "find" that dialog and kill it.


I found a solution for showing the dialog:


Banner::show /NOUNLOAD "Please wait while the directory is found"
;do your long running stuff here
Banner::destroy


See for more info:
http://nsis.sourceforge.net/Docs/Banner/Readme.txt