使用Excel VBA的设备ID [英] Device ID with Excel VBA

查看:193
本文介绍了使用Excel VBA的设备ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用excel从计算机中提取IMEI编号/设备ID.

I would like to extract the IMEI number/Device ID from the computer using excel.

在CMD中,我可以这样进行操作::netsh mbn sh interface",然后从给定的列表中获取设备ID.

In CMD I can do it in this way: :netsh mbn sh interface" and from the list given I take the Device ID.

我很想在网上找到一些东西,但到目前为止还没有运气,这就是为什么我要您的帮助,也许你们当中有些人知道在哪里搜索或如何开始.

I was tryong to find something online but no luck so far, that's why I'm asking your help, maybe some of you knows where to search or how to start.

如何使用excel vba做到这一点?

How can I do this with excel vba?

推荐答案

您可以使用以下代码,然后使用split函数提取所需的内容

You can use the following and then use split function to extract what you need

Option Explicit

Public Sub TEST()
   Debug.Print CreateObject("wscript.shell").exec("cmd /V /C netsh mbn show interface").StdOut.ReadAll
End Sub

这篇关于使用Excel VBA的设备ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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