I’m settin up an outcome log for some users of my processes.
I’m facing two issues.
I’m retrieving the ipAddress in this way:
Declaring the Dns variable as :
Dns = System.Net.Dns
then assigning it to ipAddress:
ipAddress= Dns.GetHostByName(Dns.GetHostName()).AddressList(0).ToString()
the issue is that UIPath seems to do not accept Dns :
it means: “Dns is a Net type, so can’t be used as expression”
Can anyone help me resolving this?
the second issue is that I can’t find anything that allows me to get the Robot Name. I’m able to get the machine name, but I’d love to refer in log to the Ronot name, the one in yellow here:
Does anyone know how to get this? (if it’s possible)
Good going.
Try this, keep the variable type as System.Net.NetworkInformation.NetworkInterface[]
and the expressiong is System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces
Then do a for each loop:
get the properties by NetworkInteface.GetIPProperties()
Then from that get the dns address like IpProperties.DnsAddresses.
You will arrive at the final step heree:
Looping through all DNS addresses and finding the right one you need.