Sub test1() Set Sy = GetObject("winmgmts:").InstancesOf("Win32_ComputerSystem") For Each WG In Sy MsgBox "工作组" & WG.Workgroup Next End Sub Sub test2() Set Sy = GetObject("winmgmts:").InstancesOf("Win32_ComputerSystem") For Each WG In Sy MsgBox WG.UserName MsgBox WG.PrimaryOwnerName Next End Sub