Hello Experts,
I am using the following code to get IP address, System MAC Address and System Name of the local machine where PB application is running, It is running successfull when the internet is connected, If there is no Internet I am getting time error.
Syntax:
OLEObject objWMIService, IPConfigSet, IPConfig
objWMIService = CREATE OLEObject;
rs = objWMIService.ConnectToObject("winmgmts:{impersonationLevel=impersonate}!//./root/cimv2");
IPConfigSet = objWMIService.ExecQuery("Select * from Win32_NetworkAdapterConfiguration Where IPEnabled=TRUE")
IPConfig = IPConfigSet.ItemIndex(0)
s_mac = (IPConfig.Properties_.Item("MACAddress").Value);
s_description = (IPConfig.Properties_.Item("Description").Value);
s_IP = (IPConfig.Properties_.Item("IPAddress").Value(0));
Is there any other method to retrieve the IP Address, System MAC address and System name?
Thanks
Deva S