CheckIfUserExists Custom Action ignores DOMAIN_NAME - Advanced Installer Community
tonyj
Posts: 2
Joined: Fri Sep 30, 2016 10:49 am

CheckIfUserExists Custom Action ignores DOMAIN_NAME

When using the CheckIfUserExists Custom Action, if the given USER_NAME is found within the system's default domain, it appears that the DOMAIN_NAME property is ignored (AI_USER_EXISTS = "Yes").

I am attempting to allow the user to configure what User Account should be used to run a service by setting `Services To Install -> <My Service> -> Account -> Username` to [DOMAIN_NAME]\[USER_NAME] having used CheckIfUserExists to validate the credentials provided. Because CheckIfUserExists doesn't always validate the DOMAIN_NAME, it is possible for the user to input an incorrect DOMAIN_NAME which will pass my validation but then fail when the service is installed. Is there an alternative way to solve this problem?
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: CheckIfUserExists Custom Action ignores DOMAIN_NAME

Hello,

This is currently under investigation and as soon as I have a conclusive answer, I'll get back to you.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: CheckIfUserExists Custom Action ignores DOMAIN_NAME

Hello,

Several improvements were added to our "Check if user exists" custom action starting with Advanced Installer 13.6 released on February 15, 2017.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ipollock
Posts: 137
Joined: Wed Aug 31, 2016 10:46 am

Re: CheckIfUserExists Custom Action ignores DOMAIN_NAME

Hi Daniel,

I saw this post and can see that it has been a common issue for a while now.

I have thoroughly tested the LogonInformationDlg with CheckIfUserExists and can conclude that there are two ways to make this work.

1. If CheckIfUserExits custom action 'User Properites' Domain: is populated with the domain that it is verifying the user then it works ok.
2. Otherwise if this Custom Action Property is left empty and populated during install then it will fail unless the account being entered is a local machine account (local to the server or workstation).

Can you tell me if this has been resolved in your latest release please?

If so then i will look at migrating from 12.7.2 - unless the process fails during post migration testing :)

Thanks,

Ian :) :) :) :) :)
ipollock
Posts: 137
Joined: Wed Aug 31, 2016 10:46 am

Re: CheckIfUserExists Custom Action ignores DOMAIN_NAME

Actually I've just checked your latest release notes and it is specified in there as an Enhancement.
From the 27th Fen 2017.

I'll update my local copy and test before i get back to you.

Best regards,

Ian
ipollock
Posts: 137
Joined: Wed Aug 31, 2016 10:46 am

Re: CheckIfUserExists Custom Action ignores DOMAIN_NAME

Hi Daniel,

Ok, so i've tested the model again and I can see that the module is now working correctly.

I can verify a domain users account.
I can verify a local users account.

One thing I will say though is that if verifying a local users account, do not enter a domain name , skip it.

Thanks again.

Ian
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: CheckIfUserExists Custom Action ignores DOMAIN_NAME

Hello Ian,

I've tested the scenario (without specifying a domain), but the user account is always verified as expected. Could you please try to isolate the issue in a small buildable sample and forward it to us to support at advancedinstaller dot com alongside with a detailed step by step test case? Also, please specify on which operating system do you run the tests and if that is a local machine or a domain enrolled one.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ipollock
Posts: 137
Joined: Wed Aug 31, 2016 10:46 am

Re: CheckIfUserExists Custom Action ignores DOMAIN_NAME

Hi Daniel,

I've tested again but get the same issue when testing.

1. If i install and use domain credentials then i put the domain name in, otherwise it fails.
ie. I put the domain name in and it installs ok.

2. If i try to authenticate locally using a local server test account, i don't put in a domain or local server name which cause it to fail.
ie. i leave the domain name out and it installs ok.

Windows 10 workstation.
Windows Server 2012
AI 13.7

See attachment.

Best regards,
Ian
Attachments
AIP17Files.zip
(184.66 KiB) Downloaded 308 times
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: CheckIfUserExists Custom Action ignores DOMAIN_NAME

Hello Ian,

Thank you for your follow up.

Indeed, when checking a local user account you should not set the "Domain" field at all. If you set any string in the domain field our custom action will search for a domain user belonging to the domain name you specified in the Domain field.

This is the normal behavior. We will update our user guide with this info too. Thank you for bringing this to our attention.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ipollock
Posts: 137
Joined: Wed Aug 31, 2016 10:46 am

Re: CheckIfUserExists Custom Action ignores DOMAIN_NAME

That' good news - then we can conclude that this is working just how it should. :)

Thanks very much for your help.

Ian
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: CheckIfUserExists Custom Action ignores DOMAIN_NAME

You're always welcome Ian.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”