Computer Name WMI
2
Get computername with wmi
Function GetComputerName()
On Error Resume Next
Set OpSysSet = GetObject("winmgmts:\root\cimv2").ExecQuery("select * from Win32_ComputerSystem")
For each i in OpSysSet
' There should only be one anyway, but we'll do this to be sure to be sure.
GetComputerName = i.Name
Next
End Function






There are currently no comments for this snippet.