detect used dns server(s)
i have seen various methods to get the ip-address of a computer. i was wondering if there is a way of getting the used dns server once i detected the ip used for online access.
3 posts
I hope you can still use this.IpConfig::GetNetworkAdapterIDFromIPAddress $IPAddress
Pop $0 ; Get success or failure
Pop $1 ; Get result or error message
StrCmp $0 "ok" 0 error
GetNetworkAdapterDNSServers $1
Pop $0
Pop $2 ; $2 will contain all DNS servers, seperated by a space.
DetailPrint "DNSServers for IP address $IPAddress: $2"
Goto end
error:
DetailPrint "error: $1"
end: