We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

jusvu
Posts: 17
Joined: Tue Nov 02, 2021 9:28 am

Detect if folder exists and run exe if not

Hi! My app requires 3rd party app and I would like to install the 3rd party app using my installer if it is not installed (or show a note to the user that the 3rd party app is not installed)

Is there any way to include another app in the installer and check if folder exists (say, C:\Program Files\AwesomeApp) and try install it if the folder does not exist. Or can I write a condition that if C:\Program Files\AwesomeApp does not exist, my installer refuses to continue and shows some kind of note "Please install AwesomeApp first" instead?

This is possible with InstallShield, but I couldn't figure out how to do this in Advanced Installer. I checked this viewtopic.php?t=26253 and managed to create a search, which works OK, but then what's next...
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Detect if folder exists and run exe if not

Hello,

The recommended approach here would be to add your 3rd party tool as a prerequisite in the "Prerequisites" page.

In order to install that said prerequisite based on a condition, you should use the "Install Conditions" field from "Prerequisites" page --> your prerequisite --> "Install Conditions" tab.

Please read the following article which I've written about this subject:

Prerequisite install detection criteria - How to create one

Hope that helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jusvu
Posts: 17
Joined: Tue Nov 02, 2021 9:28 am

Re: Detect if folder exists and run exe if not

Thanks a lot! I checked the instructions you linked already earlier, but I thought I can use it for registry check only. But I re-checked it and found out that you can actually check if a file exists, so I created a new package prerequisite in Pre-install folder and just added following new "Install Condition":

Criteria: FIle Version
File to find: [ProgramFiles64Folder]\AwesomeApp\AwesomeApp.exe

...and now it works great

Thanks!
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Detect if folder exists and run exe if not

You are always welcome!

Glad to hear everything is working as expected.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”