VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Get the sound device info using Win32_SoundDevice WMI Class

by Karthikeyan (187 Submissions)
Category: Miscellaneous
Compatability: VB Script
Difficulty: Unknown Difficulty
Originally Published: Wed 11th February 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Get the sound device info using Win32_SoundDevice WMI Class

Rate Get the sound device info using Win32_SoundDevice WMI Class



'Generated using 'WMI Win32 Class Autoscript Generator' - Developed by Karthikeyan
'Homepage: http://www.geocities.com/marskarthik

On Error Resume Next
Computer = "."
Set OutFile = CreateObject("WScript.Shell")
Const ForAppending = 2
Set FileSystem = CreateObject("Scripting.FileSystemObject")
Set TextFile = FileSystem.OpenTextFile ("c:\Win32_SoundDevice.txt", ForAppending, True)
TextFile.WriteLine "Script for Win32_SoundDevice Class by Karthikeyan"
TextFile.WriteLine 
Set WMIService = GetObject("winmgmts:\\" & Computer & "\root\cimv2")
Set Items = WMIService.ExecQuery("Select * from Win32_SoundDevice",,48)
For Each SubItems in Items
TextFile.WriteLine "********************************************************************"
    TextFile.WriteLine "Availability: " & SubItems.Availability
    TextFile.WriteLine "Caption: " & SubItems.Caption
    TextFile.WriteLine "ConfigManagerErrorCode: " & SubItems.ConfigManagerErrorCode
    TextFile.WriteLine "ConfigManagerUserConfig: " & SubItems.ConfigManagerUserConfig
    TextFile.WriteLine "CreationClassName: " & SubItems.CreationClassName
    TextFile.WriteLine "Description: " & SubItems.Description
    TextFile.WriteLine "DeviceID: " & SubItems.DeviceID
    TextFile.WriteLine "DMABufferSize: " & SubItems.DMABufferSize
    TextFile.WriteLine "ErrorCleared: " & SubItems.ErrorCleared
    TextFile.WriteLine "ErrorDescription: " & SubItems.ErrorDescription
    TextFile.WriteLine "InstallDate: " & SubItems.InstallDate
    TextFile.WriteLine "LastErrorCode: " & SubItems.LastErrorCode
    TextFile.WriteLine "Manufacturer: " & SubItems.Manufacturer
    TextFile.WriteLine "MPU401Address: " & SubItems.MPU401Address
    TextFile.WriteLine "Name: " & SubItems.Name
    TextFile.WriteLine "PNPDeviceID: " & SubItems.PNPDeviceID
    TextFile.WriteLine "PowerManagementCapabilities: " & SubItems.PowerManagementCapabilities
    TextFile.WriteLine "PowerManagementSupported: " & SubItems.PowerManagementSupported
    TextFile.WriteLine "ProductName: " & SubItems.ProductName
    TextFile.WriteLine "Status: " & SubItems.Status
    TextFile.WriteLine "StatusInfo: " & SubItems.StatusInfo
    TextFile.WriteLine "SystemCreationClassName: " & SubItems.SystemCreationClassName
    TextFile.WriteLine "SystemName: " & SubItems.SystemName
TextFile.WriteLine "********************************************************************"
Next
TextFile.Close
OutFile.Run "notepad.exe c:\Win32_SoundDevice.txt",1,True


Download this snippet    Add to My Saved Code

Get the sound device info using Win32_SoundDevice WMI Class Comments

No comments have been posted about Get the sound device info using Win32_SoundDevice WMI Class. Why not be the first to post a comment about Get the sound device info using Win32_SoundDevice WMI Class.

Post your comment

Subject:
Message:
0/1000 characters