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!

plutarch
Posts: 2
Joined: Thu Sep 10, 2015 11:37 am

Check if more than one file/folder exists

Hello, I am currently evaluating Advanced Installer and so far I like what the product has to offer. However there is a problem that I can't solve, so maybe you can point me in the right direction.

For testing purposes I am creating an installer that really has only one modification to it (in order to keep it simple). This is what should happen (but it does not at the moment):
- The users enters an installation path on the FolderDlg, eg. C:\MyInstallation.
- When clicking on Next, but before advancing to the VerifyReadyDlg, the installer should check, if some files/folders do exist in that selected path, eg. Folder1, Folder2, File1 and File2.

I understand that if I was only checking for one file/folder, I could simply use the Installation Path verification that comes with the FolderDlg. However in my case I want the installer to check for multiple files/folders. Also this file/folder check has to repeat when the user changes the installation path on the FolderDlg (that is why I thought it would be a good idea to have that verification on the Next button).

Is there an easy way to achieve this?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Check if more than one file/folder exists

Hi and welcome to Advanced Installer forums.

Thank you for your interest in Advanced Installer.

I'm afraid that we do not have predefined support for this. However, in order to achieve this, you can create your own custom action that searches for the files and folders that you need, than place that custom action on the "Next" button of the "FolderDlg" dialog.

Just let us know if you have any other question.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
plutarch
Posts: 2
Joined: Thu Sep 10, 2015 11:37 am

Re: Check if more than one file/folder exists

Thank you for the fast reply.
Eusebiu wrote:you can create your own custom action that searches for the files and folders that you need, than place that custom action on the "Next" button of the "FolderDlg" dialog.
I already took a look at the Custom Actions menu, but unfortunately I wasn't able to find a custom action that checks for existing files/folders. I come from both InstallScript (InstallShield) and SFScript (Setup Factory) where it was relatively easy to create an IF file/folder exists check, but this seems to be more complicated for MSI applications. How would I achieve that in Advanced Installer?

Also what happens if my evalutation period is over in the next couple of days? Is there a way to evaluate for some additional let's say 14 days or so?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Check if more than one file/folder exists

Hi,
I already took a look at the Custom Actions menu, but unfortunately I wasn't able to find a custom action that checks for existing files/folders. I come from both InstallScript (InstallShield) and SFScript (Setup Factory) where it was relatively easy to create an IF file/folder exists check, but this seems to be more complicated for MSI applications. How would I achieve that in Advanced Installer?
In order to search for existing files/folders, you can use the support from the "Search" page (i.e. file search or folder search). However, these searches are performed at the beginning of the installation and they cannot be executed on custom buttons.

If you want to search for a file or a folder when pressing on a button, you can create for example a VBScript custom action, a custom action written in C# or a custom action written in C++, then add them in the "Custom Actions" page and place them on the button you need.

You can also take a look on the How to integrate and debug custom actions? article which may be useful to you.
Also what happens if my evalutation period is over in the next couple of days? Is there a way to evaluate for some additional let's say 14 days or so?
When you evaluation period expires you can send us an e-mail to support at advancedinstaller dot com and we will give you a 30-days trial extension.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”