Archive: How to get FQDN using NSIS Script


How to get FQDN using NSIS Script
  Currently we are using "Internet::GetLocalHostIP ${ip_addr}" to get the local host IP and using the IP for registering the application.

But to handle hosts with multiple NIC card, we are planing to use the FQDN(Fully Qualified Domain Name) instead of the ip address.

Is there any way to get the FQDN of the localhost using NSI script? Any other known workaround?

- Bhupen


may be we can get the fqdn by appending domain name after hostname. how to get the hostname? any available plugin?


I believe you want to use the getnameinfo win32 api call for this.

http://msdn.microsoft.com/en-us/library/ms738532%28VS.85%29.aspx


... Ignore the Other Zinthose he is a newb.. use this instead.


0
SectionEnd
>

I created a Wiki page for this:
  http://nsis.sourceforge.net/Fully_Qualified_Domain_Name


Thanks Zinthose. The wiki was of great help.

I need to use few of the IpConfig plugin APIs(like GetHostName, GetPrimaryDNSSuffix, GetAllNetworkAdaptersIDs, GetEnabledNetworkAdaptersIDs, GetNetworkAdapterIPAddresses etc.). But looks like IpConfig plugin is not working properly(I am trying with windows XP).

Please help.


Looks like you already found the IPConfig Plugin Forum Topic

Listen To MSG he has the answer ;-)

Originally posted by MSG
The dll should be in NSIS\Plugins, not $INSTDIR\plugin.
Just to clarify that is the NSIS\Plugins dir were you have NSIS installed.