使用我的软件时的系统名称和mac [英] System name and mac while using my software

查看:67
本文介绍了使用我的软件时的系统名称和mac的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在客户端安装我的软件。我想要有多少系统正在使用我的软件。我想要系统名称和mac。给我一些例子。请帮助我....

i install my software in the client .i want to how many system are using my software.i want there system name and mac .Give some example.please help me....

推荐答案

嗨kalisiddayya,



试试这个:



进口System.Net

''-----------获取机器名称--->

MachineName = System.Environment.MachineName



''-----------获取机器名称的IP地址--->

Dim myIPs作为System.Net。 IPHostEntry = System.Net.Dns.GetHostByName(MachineName)

For myIP As System.Net.IPAddress in myIPs.AddressList

IPaddress = myIP.ToString()

下一页

''-----------获取机器名称的MAC(物理)地址--->

Dim theNetworkInterfaces()As System.Net.NetworkInformation.NetworkInterface = System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()

For Each currentInterface As Sys tem.Net.NetworkInformation.NetworkInterface在网络接口中

MACAddress = currentInterface.GetPhysicalAddress()。ToString

退出Sub

下一页



我在谷歌搜索后找到了这个: http://www.dotnetspider.com/resources/36826-Get-system-IP-Addr-MAC-Addr-Computer-Name.aspx [ ^ ]
Hi kalisiddayya,

Try This :

Imports System.Net
''-----------GET MACHINE NAME--->
MachineName = System.Environment.MachineName

''-----------GET IP ADDRESS OF THE MACHINE NAME--->
Dim myIPs As System.Net.IPHostEntry = System.Net.Dns.GetHostByName(MachineName)
For Each myIP As System.Net.IPAddress In myIPs.AddressList
IPaddress = myIP.ToString()
Next
''-----------GET MAC(PHYSICAL) ADDRESS OF THE MACHINE NAME--->
Dim theNetworkInterfaces() As System.Net.NetworkInformation.NetworkInterface = System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()
For Each currentInterface As System.Net.NetworkInformation.NetworkInterface In theNetworkInterfaces
MACAddress = currentInterface.GetPhysicalAddress().ToString
Exit Sub
Next

I found this after a google search here : http://www.dotnetspider.com/resources/36826-Get-system-IP-Addr-MAC-Addr-Computer-Name.aspx[^]


尝试



http://books.google.co.uk/books?id=36LJaOHQ2YIC&pg=PA375&lpg=PA375&dq=VB+System.Net.NetworkInformation.PhysicalAddress&source=bl&ots = -eUc5bF-3K&安培; SIG = 2IGx8cXNdJWNs852oc8LmpBBIPE&安培; HL = EN&安培; SA = X&安培; EI = -O3rUL3IHMS50QXc-oH4BA&安培; VED = 0CGQQ6AEwCQ#v = onepage&安培; q = VB%20System.Net.NetworkInformation.PhysicalAddress&安培; F =假 [ ^ ]


这篇关于使用我的软件时的系统名称和mac的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆