PDA

View Full Version : Install Folder not verified



PodHunter
02-09-2015, 03:44 AM
I'm using the RC 8.5.4686.
Because my DLL is deliverd to another author's folder (which must exist), you kindly added the No "Make new folder" option to the Select Install Folder dialog.
However, that leads to another problem. At build time, I don't know where the third-party software is installed, so I make a guess. The user sees my guess, which may be incorrect. At that point the Select Install Folder dialog is visible and showing the wrong folder. User must change to a valid folder in order for installation to continue. User can't create a new folder and must navigate to a valid existing folder.
How can I prevent installation continuing when a valid folder has not been selected?

linder
02-09-2015, 10:50 AM
Hello,

You can do something similar to the attached code snippet.

Does this help?

Friedrich

linder
02-09-2015, 10:58 AM
BTW, and you can use the built-in script functions to see if the correct folder does exist. For example, "If File/Folder..." or check if the DLL has the correct and expected version number ("Get File Info..."), etc. If the "selected" folder is incorrect, display a warning message.

And it's very well possible the 3rd-party has registered the installation location of the DLL in the registry. You can read that location from within the installer and pre-set it (e.g. "Detect Previous Version..." or "Get Registry Key Value...").

Friedrich

PodHunter
02-18-2015, 11:24 AM
You can use the built-in script functions to see if the correct folder does exist. For example, "If File/Folder..." or check if the DLL has the correct and expected version number ("Get File Info..."), etc.
Thanks for your suggestion. The following seems to do what I want:

! Edit '3' to match the ID of your 'Select Install Folder' dialog
If %_SB_DIALOGID% Equals "3" Then
If %_SB_INSTALLDIR% File or Folder doesn't exist Then
Display Message Box "Please browse to find the XXX folder" -- "Installation Folder"
Cycle Loop
End
End

linder
02-19-2015, 03:57 AM
Perfect. Thanks for the update.

Friedrich