Page 1 of 1

Disable installation into certain folder

Posted: Fri May 28, 2010 8:33 am
by tosch
When the user selects an installation directory I want to check if a certain program exists in the selected folder.
If this is true I want to force the user to select a different directory. I'm doing this because I don't want two of our application to be installed in the same directory for various reasons.

Can anyone give me some directions on how to solve this? Can I run a script when a button is clicken and then enable/disable a control on a dialog?

Thomas

Re: Disable installation into certain folder

Posted: Fri May 28, 2010 12:25 pm
by sdeschenes
When the user selects their destination, use the Does File/Folder Exists command on $TARGETDIR$\appname.exe. If the app exists in the target directory, display a message telling the user to select a new directory and after the user dismisses the message, reload the destination dialog.

Re: Disable installation into certain folder

Posted: Mon May 31, 2010 3:48 am
by tosch
I was looking for a way to add script lines to controls on the dialog. But checking this after returning from the dialog and then redisplaying the dialog works fine. Thanks.

Thomas