Custom search with custom executable - 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!

prolancer
Posts: 17
Joined: Wed Nov 23, 2011 6:16 am

Custom search with custom executable

Hi,

I am surprised that it is not possible to define a custom search based on custom executable. This is certainly possible with searches for pre-requisites.

I need to detect version and edition of MS SQL Server that is installed on the machine. For this you need to do a “complex” search in the registry. The only way I think that this can be done is with a search based on a custom executable.

Is there a way to define a custom search based on a custom executable?

Thank you
Emil
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Custom search with custom executable

Hi Emil,
Is there a way to define a custom search based on a custom executable?
Unfortunately no, but you can create your own .DLL custom action scheduled after AppSearch standard action with the same effect.
This custom action should set an installer public property just like a custom search does. You cannot use an .EXE because this type of custom action cannot set installer properties.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
prolancer
Posts: 17
Joined: Wed Nov 23, 2011 6:16 am

Re: Custom search with custom executable

Thank you Mihai,

I will try it. However, do you have an example that you can share?

Maybe a future edition of AI will support custom searches based on custom executables :).

Emil
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Custom search with custom executable

Hi Emil,

I added your request on our TODO list and we will consider including it in the future.

In the meantime you should create a custom action. Here are a couple of articles to get your started: If you are not willing to rewrite the search algorithm into a custom action, you could create a custom action that just launches your existing .EXE and sets an installer property. Let us know how you choose to approach this.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
prolancer
Posts: 17
Joined: Wed Nov 23, 2011 6:16 am

Re: Custom search with custom executable

Hi Mihai,

thank you for your help on this. I have created the DLL file with the custom action. Few questions:

1. The instructions say I need to add the DLL file to my project. How do I do this?
“New Installed Custom Action” is always disabled on the context menu. I suspect it will remain so until I add the DLL file to the project.

2. I am trying to set a property to TRUE as string in my code. For example

Code: Select all

session["UNSUPPORTED_SQLSERVER"] = "TRUE";
Then, I use this property to show a dialog in the dialog sequence using a condition which simply says "UNSUPPORTED_SQLSERVER". The dialog does not appear at all. Before I had a custom search condition named UNSUPPORTED_SQLSERVER and if this evaluated to TRUE (search for registry value), the dialog appears.
Does the UNSUPPORTED_SQLSERVER property need to exist in the project, and if so, how do I create it?

Thank you
Emil
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Custom search with custom executable

Hi Emil,
The instructions say I need to add the DLL file to my project. How do I do this?
You can add it as an Attached Custom Action instead:
http://www.advancedinstaller.com/user-g ... #section20
Does the UNSUPPORTED_SQLSERVER property need to exist in the project, and if so, how do I create it?
Yes, you can define public properties in the Install Parameters page.
As you may already know, a property is evaluated to true in a condition when it has a value different from an empty string or "{}" character occurrence.
In your case, you can declare the propriety with "{}".

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”