fqdn name

43 views
Skip to first unread message

Alex Ustas

unread,
Mar 4, 2015, 5:19:30 AM3/4/15
to msi...@googlegroups.com
Hi! Thanks for this project.

How I Can get FQDN name computer?


Daniel Doubrovkine

unread,
Mar 4, 2015, 6:20:10 AM3/4/15
to msi...@googlegroups.com

On Wed, Mar 4, 2015 at 5:19 AM, Alex Ustas <dshel...@gmail.com> wrote:
Hi! Thanks for this project.

How I Can get FQDN name computer?


--
You received this message because you are subscribed to the Google Groups "msiext" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msiext+un...@googlegroups.com.
To post to this group, send email to msi...@googlegroups.com.
Visit this group at http://groups.google.com/group/msiext.
For more options, visit https://groups.google.com/d/optout.



--

Alex Ustas

unread,
Mar 4, 2015, 11:02:29 PM3/4/15
to msi...@googlegroups.com
Thanks for answer but DS_COMPUTERNAME is Parameter and DirectoryGetDcName not return this.

Parameters
DS_COMPUTERNAMEOptional string that specifies the name of the server to process this function.
DS_DOMAINNAMEOptional string that specifies the name of the domain or application partition to query.
DS_SITENAMEOptional string that specifies the name of the site where the returned domain controller should physically exist.
DS_FLAGSContains a set of flags that provide additional data used to process the request.
Returns
DS_DOMAINCONTROLLER_NAME Specifies the computer name of the discovered domain controller, stripped from heading backslashes.
DS_DOMAINCONTROLLER_ADDRESS Specifies the address of the discovered domain controller, stripped from heading backslashes.
DS_DOMAIN_NAME Specifies the name of the domain.


среда, 4 марта 2015 г., 17:20:10 UTC+6 пользователь Daniel Doubrovkine написал:

Daniel Doubrovkine

unread,
Mar 5, 2015, 8:15:47 AM3/5/15
to msi...@googlegroups.com
Oh sorry I don't know what I was thinking :)


I think you want something like this:


<CustomAction Id="SetFqdnComputerName" Property="FQDN_COMPUTERNAME" Value="[%COMPUTERNAME].[%USERDNSDOMAIN]" Execute="immediate" />

If this doesn't work, I'd welcome a custom action that gets it via Win32 API, but I suspect we never implemented it because we never actually needed it. Maybe you want to tell us where you want to use the result of this?




--
You received this message because you are subscribed to the Google Groups "msiext" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msiext+un...@googlegroups.com.
To post to this group, send email to msi...@googlegroups.com.
Visit this group at http://groups.google.com/group/msiext.
For more options, visit https://groups.google.com/d/optout.

Alex Ustas

unread,
Jun 8, 2015, 11:32:37 PM6/8/15
to msi...@googlegroups.com
In the Unix OS has a utility nostnate using that with the -f option get fqdn. In Windows have to use scripts for get fqdn.
I wanted to use fqdn in the configuration file zabbix agent for active checks.

Example:
Hostname=testserver.fqdn.com

in lower case

четверг, 5 марта 2015 г., 19:15:47 UTC+6 пользователь Daniel Doubrovkine написал:

Daniel Doubrovkine

unread,
Jun 9, 2015, 8:26:23 AM6/9/15
to msi...@googlegroups.com
What exactly is the question? Are you asking how to do the actual replacement inside that configuration file? Wix has something called IniFile (if your file is in that format), I think http://blogs.technet.com/b/alexshev/archive/2008/04/03/from-msi-to-wix-part-15-installable-items-ini-files.aspx is a good place to start.

Alex Ustas

unread,
Jun 9, 2015, 1:52:25 PM6/9/15
to msi...@googlegroups.com
Create with StringTools.dll and SystemTools.dll

In SystemTools use TemplateFile, because in wix IniFile attribute Section is required and must be not null. Zabbix agent use config "Key=Value" without Section.

In StringTools use String_ToLower, that Lower case fqdn received by env.
For Windows 2008 R2+ and OS then install Powershell can use HostnameItem=system.run[powershell -NonInteractive "[System.Net.Dns]::GetHostByName(($env:computerName)).Hostname.ToLower()"] but in my organization there is and Windows 2003 Server R2 too. So I used
StringTools.

Thank you very much. My Englsih is very Bad)
Reply all
Reply to author
Forward
0 new messages