|
example :-
use OLE;
$oResolve = CreateObject OLE "WebResolve.WebResolve";
$oNetwork = CreateObject OLE "Wscript.Network";
$sComputerName = $oNetwork->{ComputerName};
$oResolve->{host} = $sComputerName;
$sMyIP = $oResolve->Resolve;
print "Hostname=$sComputerName\nIP=$sMyIP\n";
|
|