PDA

Показать полную графическую версию : [решено] Скрипт копирующий всю информацию из свойст ПК


Centrinar
18-04-2010, 17:23
В свойствах системы прописываеться модель ноутбука или ПК, процессора и т.д.. Как эту информацию считать?

amel27
19-04-2010, 11:15
Centrinar, ищите OEM инфу в файле: "C:\WINDOWS\System32\oeminfo.ini"
для остальных параметров смотрите макросы в справке (раздел Macro Reference - System Info)

madmasles
19-04-2010, 11:58
Centrinar,
Или так попробуйте: ; Generated by AutoIt Scriptomatic

$wbemFlagReturnImmediately = 0x10
$wbemFlagForwardOnly = 0x20
$colItems = ""
$strComputer = "localhost"

$Output = ""
$Output = $Output & "Computer: " & $strComputer & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "==========================================" & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$objWMIService = ObjGet (http://www.autoitscript.com/autoit3/docs/functions/ObjGet.htm)("winmgmts:\\" & $strComputer & "\root\CIMV2")
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem", "WQL", _
$wbemFlagReturnImmediately + $wbemFlagForwardOnly)

If (http://www.autoitscript.com/autoit3/docs/keywords.htm#If) IsObj (http://www.autoitscript.com/autoit3/docs/functions/IsObj.htm)($colItems) Then (http://www.autoitscript.com/autoit3/docs/keywords.htm#Then)
For (http://www.autoitscript.com/autoit3/docs/keywords.htm#For) $objItem In (http://www.autoitscript.com/autoit3/docs/keywords.htm#In) $colItems
$Output = $Output & "AdminPasswordStatus: " & $objItem.AdminPasswordStatus & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "AutomaticResetBootOption: " & $objItem.AutomaticResetBootOption & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "AutomaticResetCapability: " & $objItem.AutomaticResetCapability & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "BootOptionOnLimit: " & $objItem.BootOptionOnLimit & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "BootOptionOnWatchDog: " & $objItem.BootOptionOnWatchDog & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "BootROMSupported: " & $objItem.BootROMSupported & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "BootupState: " & $objItem.BootupState & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "Caption: " & $objItem.Caption & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "ChassisBootupState: " & $objItem.ChassisBootupState & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "CreationClassName: " & $objItem.CreationClassName & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "CurrentTimeZone: " & $objItem.CurrentTimeZone & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "DaylightInEffect: " & $objItem.DaylightInEffect & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "Description: " & $objItem.Description & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "Domain: " & $objItem.Domain & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "DomainRole: " & $objItem.DomainRole & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "EnableDaylightSavingsTime: " & $objItem.EnableDaylightSavingsTime & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "FrontPanelResetStatus: " & $objItem.FrontPanelResetStatus & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "InfraredSupported: " & $objItem.InfraredSupported & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$strInitialLoadInfo = $objItem.InitialLoadInfo(0)
$Output = $Output & "InitialLoadInfo: " & $strInitialLoadInfo & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "InstallDate: " & WMIDateStringToDate($objItem.InstallDate) & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "KeyboardPasswordStatus: " & $objItem.KeyboardPasswordStatus & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "LastLoadInfo: " & $objItem.LastLoadInfo & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "Manufacturer: " & $objItem.Manufacturer & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "Model: " & $objItem.Model & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "Name: " & $objItem.Name & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "NameFormat: " & $objItem.NameFormat & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "NetworkServerModeEnabled: " & $objItem.NetworkServerModeEnabled & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "NumberOfLogicalProcessors: " & $objItem.NumberOfLogicalProcessors & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "NumberOfProcessors: " & $objItem.NumberOfProcessors & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$strOEMLogoBitmap = $objItem.OEMLogoBitmap(0)
$Output = $Output & "OEMLogoBitmap: " & $strOEMLogoBitmap & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$strOEMStringArray = $objItem.OEMStringArray(0)
$Output = $Output & "OEMStringArray: " & $strOEMStringArray & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "PartOfDomain: " & $objItem.PartOfDomain & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "PauseAfterReset: " & $objItem.PauseAfterReset & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$strPowerManagementCapabilities = $objItem.PowerManagementCapabilities(0)
$Output = $Output & "PowerManagementCapabilities: " & $strPowerManagementCapabilities & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "PowerManagementSupported: " & $objItem.PowerManagementSupported & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "PowerOnPasswordStatus: " & $objItem.PowerOnPasswordStatus & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "PowerState: " & $objItem.PowerState & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "PowerSupplyState: " & $objItem.PowerSupplyState & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "PrimaryOwnerContact: " & $objItem.PrimaryOwnerContact & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "PrimaryOwnerName: " & $objItem.PrimaryOwnerName & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "ResetCapability: " & $objItem.ResetCapability & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "ResetCount: " & $objItem.ResetCount & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "ResetLimit: " & $objItem.ResetLimit & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$strRoles = $objItem.Roles(0)
$Output = $Output & "Roles: " & $strRoles & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "Status: " & $objItem.Status & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$strSupportContactDescription = $objItem.SupportContactDescription(0)
$Output = $Output & "SupportContactDescription: " & $strSupportContactDescription & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "SystemStartupDelay: " & $objItem.SystemStartupDelay & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$strSystemStartupOptions = $objItem.SystemStartupOptions(0)
$Output = $Output & "SystemStartupOptions: " & $strSystemStartupOptions & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "SystemStartupSetting: " & $objItem.SystemStartupSetting & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "SystemType: " & $objItem.SystemType & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "ThermalState: " & $objItem.ThermalState & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "TotalPhysicalMemory: " & $objItem.TotalPhysicalMemory & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "UserName: " & $objItem.UserName & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "WakeUpType: " & $objItem.WakeUpType & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
$Output = $Output & "Workgroup: " & $objItem.Workgroup & @CRLF (http://www.autoitscript.com/autoit3/docs/macros.htm#@CRLF)
If (http://www.autoitscript.com/autoit3/docs/keywords.htm#If) MsgBox (http://www.autoitscript.com/autoit3/docs/functions/MsgBox.htm)(1, "WMI Output", $Output) = 2 Then (http://www.autoitscript.com/autoit3/docs/keywords.htm#Then) ExitLoop (http://www.autoitscript.com/autoit3/docs/keywords.htm#ExitLoop)
$Output = ""
Next (http://www.autoitscript.com/autoit3/docs/keywords.htm#Next)
Else (http://www.autoitscript.com/autoit3/docs/keywords.htm#Else)
MsgBox (http://www.autoitscript.com/autoit3/docs/functions/MsgBox.htm)(0, "WMI Output", "No WMI Objects Found for class: " & "Win32_ComputerSystem")
EndIf (http://www.autoitscript.com/autoit3/docs/keywords.htm#EndIf)

Func (http://www.autoitscript.com/autoit3/docs/keywords.htm#Func) WMIDateStringToDate($dtmDate)

Return (http://www.autoitscript.com/autoit3/docs/keywords.htm#Return) (StringMid (http://www.autoitscript.com/autoit3/docs/functions/StringMid.htm)($dtmDate, 5, 2) & "/" & _
StringMid (http://www.autoitscript.com/autoit3/docs/functions/StringMid.htm)($dtmDate, 7, 2) & "/" & StringLeft (http://www.autoitscript.com/autoit3/docs/functions/StringLeft.htm)($dtmDate, 4) _
& " " & StringMid (http://www.autoitscript.com/autoit3/docs/functions/StringMid.htm)($dtmDate, 9, 2) & ":" & StringMid (http://www.autoitscript.com/autoit3/docs/functions/StringMid.htm)($dtmDate, 11, 2) & ":" & StringMid (http://www.autoitscript.com/autoit3/docs/functions/StringMid.htm)($dtmDate, 13, 2))
EndFunc (http://www.autoitscript.com/autoit3/docs/keywords.htm#EndFunc) ;==>WMIDateStringToDateScriptOmatic.au3 (http://www.autoitscript.com/forum/index.php?app=core&module=attach&section=attach&attach_id=30196)




© OSzone.net 2001-2012