|
樓主的自動 偵測 及 摘取 我沒用過,但下面的script 幫得上忙嗎 ?
由正常系統取得驅動資訊, 如 顯卡. 下列 是ATI
運行 vbscript 獲得下列 資訊. 當然可以是其它方法, 在下功夫淺, 只懂用用 vb.
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
AcceleratorCapabilities:
AdapterCompatibility: ATI Technologies Inc.
AdapterDACType: Internal DAC(400MHz)
AdapterRAM: 268435456
Availability: 3
CapabilityDescriptions:
Caption: 256MB ATI RADEON X600
ColorTableEntries:
ConfigManagerErrorCode: 0
ConfigManagerUserConfig: False
CreationClassName: Win32_VideoController
CurrentBitsPerPixel: 32
CurrentHorizontalResolution: 1680
CurrentNumberOfColors: 4294967296
CurrentNumberOfColumns: 0
CurrentNumberOfRows: 0
CurrentRefreshRate: 60
CurrentScanMode: 4
CurrentVerticalResolution: 1050
Description: 256MB ATI RADEON X600
DeviceID: VideoController1
DeviceSpecificPens: -1
DitherType:
DriverDate: 20050531060800.000000-000
DriverVersion: 6.14.10.6542
ErrorCleared:
ErrorDescription:
ICMIntent:
ICMMethod:
InfFilename: oem2.inf
InfSection: ati2mtag_RV380x
InstallDate:
InstalledDisplayDrivers: ati2dvag.dll
LastErrorCode:
MaxMemorySupported:
MaxNumberControlled:
MaxRefreshRate: 75
MinRefreshRate: 60
Monochrome: False
Name: 256MB ATI RADEON X600
NumberOfColorPlanes: 1
NumberOfVideoPages:
PNPDeviceID: PCI\VEN_1002&DEV_5B62&SUBSYS_0B021002&REV_00\4&1603E009&0&0008
PowerManagementCapabilities:
PowerManagementSupported:
ProtocolSupported:
ReservedSystemPaletteEntries:
SpecificationVersion:
Status: OK
StatusInfo:
SystemCreationClassName: Win32_ComputerSystem
SystemName: BARTPE-21131
SystemPaletteEntries:
TimeOfLastReset:
VideoArchitecture: 5
VideoMemoryType: 2
VideoMode:
VideoModeDescription: 1680 x 1050 x 4294967296 色
VideoProcessor: RADEON X600 PRO (0x5B62)
AcceleratorCapabilities:
AdapterCompatibility: ATI Technologies Inc.
AdapterDACType:
AdapterRAM:
Availability: 8
CapabilityDescriptions:
Caption: 256MB ATI RADEON X600 Secondary
ColorTableEntries:
ConfigManagerErrorCode: 0
ConfigManagerUserConfig: False
CreationClassName: Win32_VideoController
CurrentBitsPerPixel:
CurrentHorizontalResolution:
CurrentNumberOfColors:
CurrentNumberOfColumns:
CurrentNumberOfRows:
CurrentRefreshRate:
CurrentScanMode:
CurrentVerticalResolution:
Description: 256MB ATI RADEON X600 Secondary
DeviceID: VideoController2
DeviceSpecificPens:
DitherType:
DriverDate: 20050531060800.000000-000
DriverVersion: 6.14.10.6542
ErrorCleared:
ErrorDescription:
ICMIntent:
ICMMethod:
InfFilename: oem2.inf
InfSection: ati2mtag_RV380x
InstallDate:
InstalledDisplayDrivers: ati2dvag.dll
LastErrorCode:
MaxMemorySupported:
MaxNumberControlled:
MaxRefreshRate:
MinRefreshRate:
Monochrome: False
Name: 256MB ATI RADEON X600 Secondary
NumberOfColorPlanes:
NumberOfVideoPages:
PNPDeviceID: PCI\VEN_1002&DEV_5B72&SUBSYS_0B031002&REV_00\4&1603E009&0&0108
PowerManagementCapabilities:
PowerManagementSupported:
ProtocolSupported:
ReservedSystemPaletteEntries:
SpecificationVersion:
Status: OK
StatusInfo:
SystemCreationClassName: Win32_ComputerSystem
SystemName: BARTPE-21131
SystemPaletteEntries:
TimeOfLastReset:
VideoArchitecture: 5
VideoMemoryType: 2
VideoMode:
VideoModeDescription:
VideoProcessor:
由上得知 是 ATI Radeon X600, 也知 PNPDeviceID (舊的做法,聲卡便是靠 devcon.exe 對該 ID 安裝) ,
知道了是使用 InfFilename: oem2.inf, InfSection: ati2mtag_RV380x, InstalledDisplayDrivers: ati2dvag.dll 驅動文件也知道了.
也許可以再加上些 script , 在正常 windows 內找得該些文件. 再 zip 成句, 配合 樓主的程序使用.
附 vbscript 例, 是在網上找的. 不是我的功勞.
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_VideoController",,48)
For Each objItem in colItems
Wscript.Echo "AcceleratorCapabilities: " & objItem.AcceleratorCapabilities
Wscript.Echo "AdapterCompatibility: " & objItem.AdapterCompatibility
Wscript.Echo "AdapterDACType: " & objItem.AdapterDACType
Wscript.Echo "AdapterRAM: " & objItem.AdapterRAM
Wscript.Echo "Availability: " & objItem.Availability
Wscript.Echo "CapabilityDescriptions: " & objItem.CapabilityDescriptions
Wscript.Echo "Caption: " & objItem.Caption
Wscript.Echo "ColorTableEntries: " & objItem.ColorTableEntries
Wscript.Echo "ConfigManagerErrorCode: " & objItem.ConfigManagerErrorCode
Wscript.Echo "ConfigManagerUserConfig: " & objItem.ConfigManagerUserConfig
Wscript.Echo "CreationClassName: " & objItem.CreationClassName
Wscript.Echo "CurrentBitsPerPixel: " & objItem.CurrentBitsPerPixel
Wscript.Echo "CurrentHorizontalResolution: " & objItem.CurrentHorizontalResolution
Wscript.Echo "CurrentNumberOfColors: " & objItem.CurrentNumberOfColors
Wscript.Echo "CurrentNumberOfColumns: " & objItem.CurrentNumberOfColumns
Wscript.Echo "CurrentNumberOfRows: " & objItem.CurrentNumberOfRows
Wscript.Echo "CurrentRefreshRate: " & objItem.CurrentRefreshRate
Wscript.Echo "CurrentScanMode: " & objItem.CurrentScanMode
Wscript.Echo "CurrentVerticalResolution: " & objItem.CurrentVerticalResolution
Wscript.Echo "Description: " & objItem.Description
Wscript.Echo "DeviceID: " & objItem.DeviceID
Wscript.Echo "DeviceSpecificPens: " & objItem.DeviceSpecificPens
Wscript.Echo "DitherType: " & objItem.DitherType
Wscript.Echo "DriverDate: " & objItem.DriverDate
Wscript.Echo "DriverVersion: " & objItem.DriverVersion
Wscript.Echo "ErrorCleared: " & objItem.ErrorCleared
Wscript.Echo "ErrorDescription: " & objItem.ErrorDescription
Wscript.Echo "ICMIntent: " & objItem.ICMIntent
Wscript.Echo "ICMMethod: " & objItem.ICMMethod
Wscript.Echo "InfFilename: " & objItem.InfFilename
Wscript.Echo "InfSection: " & objItem.InfSection
Wscript.Echo "InstallDate: " & objItem.InstallDate
Wscript.Echo "InstalledDisplayDrivers: " & objItem.InstalledDisplayDrivers
Wscript.Echo "LastErrorCode: " & objItem.LastErrorCode
Wscript.Echo "MaxMemorySupported: " & objItem.MaxMemorySupported
Wscript.Echo "MaxNumberControlled: " & objItem.MaxNumberControlled
Wscript.Echo "MaxRefreshRate: " & objItem.MaxRefreshRate
Wscript.Echo "MinRefreshRate: " & objItem.MinRefreshRate
Wscript.Echo "Monochrome: " & objItem.Monochrome
Wscript.Echo "Name: " & objItem.Name
Wscript.Echo "NumberOfColorPlanes: " & objItem.NumberOfColorPlanes
Wscript.Echo "NumberOfVideoPages: " & objItem.NumberOfVideoPages
Wscript.Echo "PNPDeviceID: " & objItem.PNPDeviceID
Wscript.Echo "PowerManagementCapabilities: " & objItem.PowerManagementCapabilities
Wscript.Echo "PowerManagementSupported: " & objItem.PowerManagementSupported
Wscript.Echo "ProtocolSupported: " & objItem.ProtocolSupported
Wscript.Echo "ReservedSystemPaletteEntries: " & objItem.ReservedSystemPaletteEntries
Wscript.Echo "SpecificationVersion: " & objItem.SpecificationVersion
Wscript.Echo "Status: " & objItem.Status
Wscript.Echo "StatusInfo: " & objItem.StatusInfo
Wscript.Echo "SystemCreationClassName: " & objItem.SystemCreationClassName
Wscript.Echo "SystemName: " & objItem.SystemName
Wscript.Echo "SystemPaletteEntries: " & objItem.SystemPaletteEntries
Wscript.Echo "TimeOfLastReset: " & objItem.TimeOfLastReset
Wscript.Echo "VideoArchitecture: " & objItem.VideoArchitecture
Wscript.Echo "VideoMemoryType: " & objItem.VideoMemoryType
Wscript.Echo "VideoMode: " & objItem.VideoMode
Wscript.Echo "VideoModeDescription: " & objItem.VideoModeDescription
Wscript.Echo "VideoProcessor: " & objItem.VideoProcessor
Next
當然, 上例只是取 得顯卡, 網卡 , 聲卡..是不同的 script 了.
[ 本帖最后由 adatsui 于 2006-12-30 01:55 AM 编辑 ] |
|