USUÁRIO:
SENHA:
SALVAR LOGIN ?
Dicas
Visual Basic
(Windows)
Título da Dica:
Obtendo informações do sistema operacional utilizando WMI
Postada em 21/6/2003 por
cacá
Esse dica funcionará sem problemas no Windows 2000 e no XP. Para utlizar a WMI no Windows 98 vocês devem instalar o WMI Core. Vocês podem fazer o download em
http://www.microsoft.com/downloads/details.aspx?FamilyID=98a4c5ba-337b-4e92-8c18-a63847760ea5&DisplayLang=en
On Error Resume Next
Dim dcSet As SWbemObjectSet
Dim objItem As SWbemObject
Set dcSet = GetObject("winmgmts:{impersonationLevel=impersonate}"). _
InstancesOf("Win32_OperatingSystem")
For Each objItem In dcSet
Debug.Print "BootDevice: " & objItem.BootDevice
Debug.Print "BuildNumber: " & objItem.BuildNumber
Debug.Print "BuildType: " & objItem.BuildType
Debug.Print "Caption: " & objItem.Caption
Debug.Print "CodeSet: " & objItem.CodeSet
Debug.Print "CountryCode: " & objItem.CountryCode
Debug.Print "CreationClassName: " & objItem.CreationClassName
Debug.Print "CSCreationClassName: " & objItem.CSCreationClassName
Debug.Print "CSDVersion: " & objItem.CSDVersion
Debug.Print "CSName: " & objItem.CSName
Debug.Print "CurrentTimeZone: " & objItem.CurrentTimeZone
Debug.Print "Debug: " & objItem.debug
Debug.Print "Description: " & objItem.Description
Debug.Print "Distributed: " & objItem.Distributed
Debug.Print "ForegroundApplicationBoost: " & objItem.ForegroundApplicationBoost
Debug.Print "FreePhysicalMemory: " & objItem.FreePhysicalMemory
Debug.Print "FreeSpaceInPagingFiles: " & objItem.FreeSpaceInPagingFiles
Debug.Print "FreeVirtualMemory: " & objItem.FreeVirtualMemory
Debug.Print "InstallDate: " & objItem.InstallDate
Debug.Print "LastBootUpTime: " & objItem.LastBootUpTime
Debug.Print "LocalDateTime: " & objItem.LocalDateTime
Debug.Print "Locale: " & objItem.Locale
Debug.Print "Manufacturer: " & objItem.Manufacturer
Debug.Print "MaxNumberOfProcesses: " & objItem.MaxNumberOfProcesses
Debug.Print "MaxProcessMemorySize: " & objItem.MaxProcessMemorySize
Debug.Print "Name: " & objItem.Name
Debug.Print "NumberOfLicensedUsers: " & objItem.NumberOfLicensedUsers
Debug.Print "NumberOfProcesses: " & objItem.NumberOfProcesses
Debug.Print "NumberOfUsers: " & objItem.NumberOfUsers
Debug.Print "Organization: " & objItem.Organization
Debug.Print "OSLanguage: " & objItem.OSLanguage
Debug.Print "OSProductSuite: " & objItem.OSProductSuite
Debug.Print "OSType: " & objItem.OSType
Debug.Print "OtherTypeDescription: " & objItem.OtherTypeDescription
Debug.Print "PlusProductID: " & objItem.PlusProductID
Debug.Print "PlusVersionNumber: " & objItem.PlusVersionNumber
Debug.Print "Primary: " & objItem.Primary
Debug.Print "QuantumLength: " & objItem.QuantumLength
Debug.Print "QuantumType: " & objItem.QuantumType
Debug.Print "RegisteredUser: " & objItem.RegisteredUser
Debug.Print "SerialNumber: " & objItem.SerialNumber
Debug.Print "ServicePackMajorVersion: " & objItem.ServicePackMajorVersion
Debug.Print "ServicePackMinorVersion: " & objItem.ServicePackMinorVersion
Debug.Print "SizeStoredInPagingFiles: " & objItem.SizeStoredInPagingFiles
Debug.Print "Status: " & objItem.Status
Debug.Print "SystemDevice: " & objItem.SystemDevice
Debug.Print "SystemDirectory: " & objItem.SystemDirectory
Debug.Print "TotalSwapSpaceSize: " & objItem.TotalSwapSpaceSize
Debug.Print "TotalVirtualMemorySize: " & objItem.TotalVirtualMemorySize
Debug.Print "TotalVisibleMemorySize: " & objItem.TotalVisibleMemorySize
Debug.Print "Version: " & objItem.Version
Debug.Print "WindowsDirectory: " & objItem.WindowsDirectory
Next
Observação: Nem todos os objetos retornam resultados
CyberWEB Network Ltda. © Copyright 2000-2024 - Todos os direitos reservados.
Powered by
HostingZone -
A melhor hospedagem para seu site