Using custom action from event - Advanced Installer Community
scambias
Posts: 29
Joined: Tue Nov 19, 2019 3:26 pm

Using custom action from event

Hi all,

sorry to bother but I still have another issue I could not solve.
I would like to use the CheckIfUserExists action from the InitEvent of a dialog, in order to disable one textfield on it.
I tried to set properties USER_NAME and DOMAIN_NAME and all the required ones by the custom action as shown in the attached picture (CheckIfUserExists_parameters_1.PNG)
Since there is no domain, I left DOMAIN_NAME as empty.
I wrote a couple of inline scripting custom actions to show the variables before and after the CheckIfUserExists execution: unfortunately the property AI_USER_EXISTS still says No.

If I use the built-in logon dialog, I get a Yes.
What is wrong with my usage?

Thank you!
Silvio
Attachments
CheckIfUserExists_parameters_1.PNG
CheckIfUserExists_parameters_1.PNG (11.06 KiB) Viewed 2637 times
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Using custom action from event

Hello Silvio,

I have tested this scenario and everything worked as expected for me.

Few things I could notice in your screenshot:

1. you set the AI_USER_IGNORE_FULLNAME property to 1. I don't think it's necessary to set this property, as you can enable the "Check only user names and ignore profile names" option from the "CheckIfUserExists" custom action:
CheckOnlyUsername.png
CheckOnlyUsername.png (123.87 KiB) Viewed 2620 times
2. you set the AI_USER_IS_GROUP to 0. The "Search in users" / "Search in groups" option from the "CheckIfUserExists" custom action is equivalent to setting AI_USER_IS_GROUP property to 1 for checking user groups instead of accounts.
SearchInUsers.png
SearchInUsers.png (122.91 KiB) Viewed 2620 times
3. you set the AI_USER_CHECK_PASSWORD to 1. This is equivalent to checking the "Check user account's password" option from the "CheckIfUserExists" custom action. Even if this is done, I couldn't see in the screenshot the place where you set the password for your account. Please keep in mind that this also has to be specified before checking the validity of the account. The property which has to be set in this case is:

Code: Select all

USER_PASSWORD
So basically, I think that you could remove the above "Set property" custom actions and do the changes directly in the "CheckIfUserExists" custom action. In addition to that, if you will check for the user password, please do not forget to also set it.

Here is a screenshot which highlights how I've tested this:
MyTest.png
MyTest.png (238.16 KiB) Viewed 2620 times
Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
scambias
Posts: 29
Joined: Tue Nov 19, 2019 3:26 pm

Re: Using custom action from event

Thank you very much for your complete and nice reply.
Thanks also for your suggestions, I will take them into account.

Kind regards,
Silvio
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Using custom action from event

You are always welcome, Silvio.

My pleasure to help.

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

Return to “Common Problems”