国际棋牌

 
 加入
查看: 544|回复: 3

win10环境下 au3 还能获取主板 序列号吗?-国际棋牌

[复制链接]
发表于 2023-9-21 00:28:09 | 显示全部楼层 |
win10环境下  au3 还能获取主板 序列号吗?
发表于 2023-9-21 09:16:05 | 显示全部楼层
只有个硬件信息查看代码

#include

$g_szversion = "info"
if winexists($g_szversion) then exit
autoitwinsettitle($g_szversion)

opt('guicloseonesc', 0)


guicreate("硬件信息查看器", 500, 350)


guictrlcreatelabel("bios:", 10, 30, 60, 30)
guictrlsetcolor(-1, 0x0000ff)
$bios = guictrlcreateinput("", 80, 20, 250, 25)

guictrlcreatelabel("主板:", 10, 70, 60, 30)
guictrlsetcolor(-1, 0x0000ff)
$board = guictrlcreateinput("", 80, 60, 250, 25)

guictrlcreatelabel("cpu:", 10, 110, 60, 30)
guictrlsetcolor(-1, 0x0000ff)
$cpu = guictrlcreateinput("", 80, 100, 250, 25)

guictrlcreatelabel("显卡:", 10, 150, 60, 30)
guictrlsetcolor(-1, 0x0000ff)
$display = guictrlcreateinput("", 80, 140, 250, 25)

guictrlcreatelabel("声卡:", 10, 190, 60, 30)
guictrlsetcolor(-1, 0x0000ff)
$sound = guictrlcreateinput("", 80, 180, 250, 25)

guictrlcreatelabel("网卡:", 10, 230, 60, 30)
guictrlsetcolor(-1, 0x0000ff)
$network = guictrlcreateinput("", 80, 220, 250, 25)

guictrlcreatelabel("内存:", 10, 270, 60, 30)
guictrlsetcolor(-1, 0x0000ff)
$mem = guictrlcreateinput("", 80, 260, 250, 25)

guictrlcreatelabel("操作系统:", 10, 310, 60, 30)
guictrlsetcolor(-1, 0x0000ff)
$os = guictrlcreateinput("", 80, 300, 250, 25)

guisetstate()
info()

while 1
        $msg = guigetmsg()

        select

                case $msg = $gui_event_close
                        exitloop
        endselect
wend


func info()

        $objwmiservice = objget("winmgmts:{impersonationlevel=impersonate}!\\.\root\cimv2")
        $colbios = $objwmiservice.execquery("select * from win32_bios")
        $colboard = $objwmiservice.execquery("select * from win32_baseboard")
        $colsettings = $objwmiservice.execquery("select * from win32_operatingsystem")
        $colmemory = $objwmiservice.execquery("select * from win32_computersystem")
        $colcpu = $objwmiservice.execquery("select * from cim_processor")
        $colvideoinfo = $objwmiservice.execquery("select * from win32_videocontroller")
        $colsound = $objwmiservice.execquery("select * from win32_sounddevice")
        $colmouse = $objwmiservice.execquery("select * from win32_pointingdevice")
        $colmonitor = $objwmiservice.execquery("select * from win32_desktopmonitor")
        $colnic = $objwmiservice.execquery("select * from win32_networkadapter where netconnectionstatus = 2")


        for $object in $colbios
                guictrlsetdata($bios, stringmid($object.caption, 1))
        next


        for $object in $colboard
                guictrlsetdata($board, $object.product)

        next


        for $object in $colcpu
                guictrlsetdata($cpu, stringstripws($object.name, 1))
        next

        for $object in $colvideoinfo
                guictrlsetdata($display, stringstripws($object.description, 1))

        next

        for $object in $colsound
                guictrlsetdata($sound, stringstripws($object.description, 1))
        next

        for $object in $colnic
                guictrlsetdata($network, stringstripws($object.name, 1))

        next


        for $objoperatingsystem in $colsettings

                guictrlsetdata($os, $objoperatingsystem.caption & " build " & $objoperatingsystem.buildnumber & " sp " & $objoperatingsystem.servicepackmajorversion & "." & $objoperatingsystem.servicepackminorversion)

        next
        for $object in $colmemory
                guictrlsetdata($mem, string(int(number($object.totalphysicalmemory) / (1024 * 1024))) & " mb")
        next

endfunc   ;==>info
发表于 2023-9-21 04:05:54 | 显示全部楼层
不知道是否是你要的
  1. wmic baseboard get serialnumber
复制代码
发表于 2023-9-22 07:56:32 | 显示全部楼层

只有个硬件信息查看代码

#include

代码不错,之前一直想 弄个这样的,后面有没管了。可以借鉴下。谢谢
您需要登录后才可以回帖 登录 | 加入

本版积分规则

||小黑屋|国际棋牌 ( ) "));

gmt 8, 2023-12-7 01:01 , processed in 0.105608 second(s), 21 queries .

powered by x3.5

© 2001-2023 .

返回列表
网站地图