本帖最后由 pcl_test 于 2016-7-22 01:13 编辑
- Set ws = CreateObject("Wscript.Shell")
- Set wmi = GetObject("winmgmts:\\.\root\cimv2")
- Set Items = wmi.ExecQuery("Select * from Win32_ComputerSystem")
- For Each Item in Items
- n = Right(Item.Name, 1)
- If IsNumeric(n) = True Then
- If n mod 2 =0 Then
- msgbox "ws.run 偶数.exe"
- Else
- msgbox "ws.run 奇数.exe"
- End If
- Else
- msgbox Item.Name
- End If
- Next
复制代码
|