把读取网卡ID的简单改一下就可以: (defun BaseBoard-SN (/ mac WMIobj serv lox sn) (vl-load-com) (setq mac '()) (if (SETQ WMIobj (VLAX-CREATE-OBJECT "wbemScripting.SwbemLocator")) (progn (SETQ serv (VLAX-INVOKE WMIobj "ConnectServer" ) ) (setq lox (vlax-invoke serv 'ExecQuery "SELECT * FROM Win32_BaseBoard" ) ) (vlax-for item lox (if (not (member (setq sn (vlax-get item 'SerialNumber)) mac) ) (setq mac (cons sn mac)) ) ) (mapcar 'vlax-release-object (list lox serv WMIobj)) ) ) mac ) (BaseBoard-SN) 不过,据说这个不是每个主板都有的,而且,网上有很多刷这个的软件。 |