Getting the Fully Qualified Domain Name

Got a problem you cannot solve? Try here.
Kostya
Posts: 29
Joined: Tue Jul 25, 2017 8:09 am

Getting the Fully Qualified Domain Name

Postby Kostya » Fri Sep 05, 2025 9:31 am

Hello,

I need to get a fully qualified domain name (FQDN) if the computer is part of a domain, and a short computer name if not. Is it possible to do this using standard InstallAware commands?

Thanks,
Kostya

JohnGaver
Posts: 247
Joined: Mon Feb 05, 2024 6:15 pm

Re: Getting the Fully Qualified Domain Name

Postby JohnGaver » Fri Sep 05, 2025 11:39 am

The Get System Settings command is your friend.

Have you looked at the following parameters:

Logged on Computer Name
Logged on Domain Name
John Gaver
InstallAware Skunkworks
InstallAware Multi Platform - Liberating DEB/RPM/PKG/MSI(X) into universal native setups!
Get your free copy today - https://www.installaware.com/installaware-multi-platform.htm

Kostya
Posts: 29
Joined: Tue Jul 25, 2017 8:09 am

Re: Getting the Fully Qualified Domain Name

Postby Kostya » Mon Sep 08, 2025 2:35 am

John, thanks for your reply! The thing is that when I tried the Get System Settings command, if the computer is not part of a domain, then the domain name is not empty, but the same as the computer name. Combining the computer and domain name values I would get "COMPUTER1.COMPUTER1". Although, in this case I need the computer name only.

So, I expected that with the Logged on Domain Name parameter it returns an empty value in the described case. If it does not, then can I be sure that if the values ​​I get when using the Logged on Computer Name and Logged on Domain Name parameters are the same, then the computer is not part of a domain and the obtained domain name can simply be discarded? I'm just afraid I'm missing a more correct way to determine this.

Kostya
Posts: 29
Joined: Tue Jul 25, 2017 8:09 am

Re: Getting the Fully Qualified Domain Name

Postby Kostya » Mon Sep 15, 2025 2:52 am

John, since this still remains unclear, let me ask you straight: was it intended and is it correct that if my computer is not part of a domain, the following command returns the computer name?

Code: Select all

Set Variable DOMAIN_NAME to
Get System Setting Logged on Domain Name into DOMAIN_NAME

In this case, I will have to determine the "not part of a domain" case somehow differently, since I don't find any command for this.

JohnGaver
Posts: 247
Joined: Mon Feb 05, 2024 6:15 pm

Re: Getting the Fully Qualified Domain Name

Postby JohnGaver » Mon Sep 15, 2025 9:22 am

Oh I missed your reply from last week!

I have been able to confirm that this behavior is as designed - if the user hasn't been joined to a domain, the returned domain name is simply the name of the local device.

You could maybe compare the two values, and if they are equal - conclude that the computer has not been joined to a domain?
John Gaver
InstallAware Skunkworks
InstallAware Multi Platform - Liberating DEB/RPM/PKG/MSI(X) into universal native setups!
Get your free copy today - https://www.installaware.com/installaware-multi-platform.htm

Kostya
Posts: 29
Joined: Tue Jul 25, 2017 8:09 am

Re: Getting the Fully Qualified Domain Name

Postby Kostya » Wed Sep 17, 2025 2:20 am

Got it, thanks for confirming! Yes, this way works.


Return to “Technical Support”

Who is online

Users browsing this forum: Google Adsense [Bot] and 78 guests