Display error dialog based on a search condition? - Advanced Installer Community

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!

waspy
Posts: 64
Joined: Fri Oct 03, 2008 10:58 am

Display error dialog based on a search condition?

Hello guys,
Can anybody advise the steps I need to go through if I want to display an error message and stop installation if a particular file or registry value is not found?

Cheers,
Alex
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Display error dialog based on a search condition?

Hi Alex,

This can be done by using a custom launch condition. First you should create a search for the file or registry value. After that, the property of the search can be used as a custom launch condition in the "Prerequisites" page.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
waspy
Posts: 64
Joined: Fri Oct 03, 2008 10:58 am

Re: Display error dialog based on a search condition?

Thanks a lot Cosmin,
But how can I specify the error message? Would be it be better if I set ErrorMessage custom action in InstallExecuteSequence/AppSearch based on the search condition? Will it work?

Cheers,
Alex
waspy
Posts: 64
Joined: Fri Oct 03, 2008 10:58 am

Re: Display error dialog based on a search condition?

I tried setting the search (for the file) APP_FOUND property and checking it in the AppSearch event displaying ErrorMessage if "NOT APP_FOUND", but that doesn't work... It always passes the check no matter what... Strange... Need help...

Cheers,
Alex
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Display error dialog based on a search condition?

Hi Alex,

Please note that if a custom launch condition is not met, its description will be shown to the user. Therefore, the text of the error message is set in the "Description" field.
Would be it be better if I set ErrorMessage custom action in InstallExecuteSequence/AppSearch based on the search condition? Will it work?
This may work, but its a complicated solution for a simple problem.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
waspy
Posts: 64
Joined: Fri Oct 03, 2008 10:58 am

Re: Display error dialog based on a search condition?

Yes, Cosmin, your solution works fine. Mine doesn't, though logically it should... Just in case, have a look at ErrorMessage custom action, there could be a glitch there...

Thanks a lot!
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Display error dialog based on a search condition?

Hi,

I tested the Error message custom action and it seems to work correctly. Can you please give me more details about the problem you encountered?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
waspy
Posts: 64
Joined: Fri Oct 03, 2008 10:58 am

Re: Display error dialog based on a search condition?

Right, I'm describing step-by step:
1. Created a new search, location folder: [WindowsVolume]Alex. I called my property TEST_ALEX.
2. In Custom Actions InstallExecuteSequence checked Show Standard Actions -> AppSearch
3. In AppSearch I inserted ErrorMessage custom action with condition "NOT TEST_ALEX".

When executing no error message is displayed... Even if I set condition "TEST_ALEX" it is still not displayed! Maybe I'm doing something wrong, but this seams logical to me...

Cheers,
Alex
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Display error dialog based on a search condition?

Hi Alex,

Please note that the "InstallExecuteSequence" runs during the actual install process. If you want to run a custom action when the UI is shown you can schedule it in the "InstallUISequence". This is a disadvantage of the custom action approach because it will not run during a silent installation.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”