Jeg ved det er muligt via vbs og wmi og crawle info om hardware i maskinen. jeg ville høre om det er muligt eks. og få af vide hvilket motherboard er der i maskinen, netkort, grafikkort, og udover det vil jeg også gerne have Serienummeret på det. kan det lade sig gøre ?
Hej Jeg har dette script det burde kunne gøre det for dig:
On Error Resume Next Dim objWMI : Set objWMI = GetObject("winmgmts:") Dim colMotherboard : Set colMotherboard = objWMI.ExecQuery("Select * from Win32_BaseBoard") Dim colSettingsSys : Set colSettingsSys = objWMI.ExecQuery("Select Vendor, Name, IdentifyingNumber from Win32_ComputerSystemProduct") Dim colSettingsComp : Set colSettings = objWMI.ExecQuery("Select * from Win32_ComputerSystem") Dim colSettingsBios : Set colSettingsBios = objWMI.ExecQuery("Select * from Win32_BIOS") Dim colBattery : Set colBattery = objWMI.ExecQuery("Select * from Win32_Battery") Dim colItems : Set colItems = objWMI.ExecQuery("Select Caption, CSDVersion, InstallDate, OSLanguage, Version, WindowsDirectory from Win32_OperatingSystem") Dim WshNetwork : Set WshNetwork = WScript.CreateObject("WScript.Network") Dim objComputer, objItem, strModel, strSerial, strComputerSystemProduct_Battery, strOperatingSystem_Caption, strOperatingSystem_ServicePack, strComputerSystemProduct_Manufacturer Dim strComputerSystem_Name, strComputerSystem_Domain, strLastUser, StrMotherboard
For Each objItem in colMotherboard StrMotherboard = objItem.Manufacturer Next
For Each objItem in colSettingsSys strComputerSystemProduct_Manufacturer = objItem.Vendor strComputerSystemProduct_Name = objItem.Name strComputerSystemProduct_IdentifyingNumber = objItem.IdentifyingNumber Next
For Each objComputer in colSettings strModel = objComputer.Model Next
For Each objItem in colSettings strComputerSystem_Domain = objItem.Domain nComputerSystem_DomainRole = objItem.DomainRole strComputerSystem_Name = objItem.Name Next
For Each objComputer in colSettingsBios strSerial = objComputer.SerialNumber Next
For Each objBattery In colBattery strComputerSystemProduct_Battery = objBattery.DeviceID Next
For Each objItem in colItems strOperatingSystem_InstallDate = objItem.InstallDate strOperatingSystem_Caption = objItem.Caption strOperatingSystem_ServicePack = objItem.CSDVersion strOperatingSystem_LanguageCode = Clng(objItem.OSLanguage) strOperatingSystem_LanguageCode = Hex(strOperatingSystem_LanguageCode) nOperatingSystemLevel = objItem.Version strOperatingSystem_WindowsDirectory = objItem.WindowsDirectory Next
strOutputFile = "c:\hardware.txt"
Set objFileSystem = CreateObject("Scripting.fileSystemObject")
Set objOutputFile = objFileSystem.CreateTextFile(strOutputFile, TRUE)
Set objWMI = Nothing Set colMotherboard = Nothing Set colSettings = Nothing Set colSettingsBios = Nothing Set colItems = Nothing Set objFileSystem = Nothing Set objOutputFile = Nothing Set colBattery = Nothing Set colSettingsSys = Nothing Set objRegLocator = Nothing Set objRegService = Nothing Set oReg = Nothing
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.