Skip to content
⌘ NSIS Forum Archive

Restore default path on Directory page after validation

5 posts

kchernock#

Restore default path on Directory page after validation

How do you change the path presented to the user on the directory page after a user-specified path fails validation? It returns the user to the directory page with the invalid field that was just rejected. How do we return the value to some type of default

ie:
Default ($INSTDIR) is set to C:\Program Files\Xyz
User browses to C:\Recycler, which fails the validation
After notifying the user that C:\Recycler is not an allowable destination, how do we change the path back to C:\Program Files\Xyz?

I have tried "StrCpy $INSTDIR C:\Program Files\Xyz in the pre and leave section of the directory page, but they only work if the user selects the "Back" and then "Next" button
jpderuiter#
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.
kchernock#
Your reply (thread link) answers the question of how to validate a user-selected folder. What I am looking to do is set the path back to a default path when the user-selected folder fails validation. Any help you can provide will be greatly appreciated as I have been struggling with this for a while.

Thanks
pengyou#
Try this link instead:
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.


This links to the message that shows how to set the path back to the default path