Disable installation into certain folder

Got a problem you cannot solve? Try here.
Post Reply
tosch
Posts: 63
Joined: Thu May 27, 2010 8:44 am

Disable installation into certain folder

Post 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
sdeschenes
Posts: 76
Joined: Wed Sep 12, 2007 3:34 pm

Re: Disable installation into certain folder

Post 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.
tosch
Posts: 63
Joined: Thu May 27, 2010 8:44 am

Re: Disable installation into certain folder

Post 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
Post Reply