@OSBuild welche Antworten möglich??

  • Ich möchte ein Info Prog schreiben, dass auch das Betriebsystem ausgibt.

    Problem: Ich hab leider nur Windows Xp Media Center Edition (@OSBuild = 2600) und weis nicht wie die anderen lauten

    Wenn ich so eine Liste hätte würde ich einfach eine If Bedingung machn
    z.B.:

    [autoit]

    If @OSBuild = 2600 Then GuictrlcreateInput("Windows Xp Media Center Edition", 0, 0)

    [/autoit]

    Gibt es eine Liste? Und wenn nicht könnt ihr bidde ma System und die Nummer posten?

    Einmal editiert, zuletzt von Yakumo500 (8. Mai 2008 um 19:54)

    • Offizieller Beitrag

    Hallo

    Öffne mal die AutoIt Hilfe, und gehe dann auf Index und tippe da dann @@OSLang ein.. Der 2te eintrag...

    Folgenes sollte bereits geschehen sein, bevor du Postest:
    AutoIt Hilfe durchsuchen --> Deutsches Forum durchsuchen --> Engl Froum durchsuchen --> google fragen --> dein eigenen verstand einsetzen --> Wenn alles nich weiterhilft Posten :)

    Mfg Spider

    • Offizieller Beitrag

    Hallo,

    GtaSpider was hat @OSLang mit @OSBuild zu tun?

    @Yakumo500 Ein Liste findest Du hier ?

  • Mega hat da mal eine gute UDF geschrieben, finde ich aber nicht mehr ...

    [autoit]

    ; Author: Mega (Xeno)
    MsgBox(0,0, _getOSVersion())

    [/autoit][autoit][/autoit][autoit]

    Func _getOSVersion()
    Local $objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
    Local $colSettings = $objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
    For $objOperatingSystem In $colSettings
    Return StringMid($objOperatingSystem.Caption, 19)
    Next
    EndFunc ;==>_getOSVersion

    [/autoit]

    Ich hoffe es ist das was Du suchst ...


    Gruß
    Greenhorn


  • Hi,
    kann ich auch diese Art auch irgendwie herausfinden, ob es sich bei dem PC um einen Laptop oder einen Desktop-PC handelt?

    • Offizieller Beitrag

    Hallo,

    ob man es direkt auslesen kann weiß ich jetzt nicht aber es gibt die WMI-Klasse Win32_Battery und Win32_PortableBattery damit kann man den Status des Akku abfragen und den gibt es ja in der Regel nur bei Notebooks!

  • Zu 100% ist das aber auch nicht sicher. Ich betreibe mein Notebook zum Beispiel immer mit Strom und habe deshalb den Akku garnicht drinnen.

    • Offizieller Beitrag

    Hallo,

    ich hab dir mal mit Scriptomatic ein Beispiel zum Auslesen von Win32_Battery erzeugt.


    Spoiler anzeigen
    [autoit]

    ; Erstellt von AutoIt Scriptomatic
    $wbemFlagReturnImmediately=0x10
    $wbemFlagForwardOnly=0x20
    $colItems=""
    $strComputer="localhost"
    $Output=""
    $Output&="Computer: " &$strComputer & @CRLF
    $Output&="==========================================" & @CRLF
    $objWMIService=ObjGet("winmgmts:\\" &$strComputer &"\root\CIMV2")
    $colItems=$objWMIService.ExecQuery("SELECT * FROM Win32_Battery", "WQL", _
    $wbemFlagReturnImmediately + $wbemFlagForwardOnly)
    If IsObj($colItems) Then
    For $objItem In $colItems
    $Output&="Availability: " &$objItem.Availability & @CRLF
    $Output&="BatteryRechargeTime: " &$objItem.BatteryRechargeTime & @CRLF
    $Output&="BatteryStatus: " &$objItem.BatteryStatus & @CRLF
    $Output&="Caption: " &$objItem.Caption & @CRLF
    $Output&="Chemistry: " &$objItem.Chemistry & @CRLF
    $Output&="ConfigManagerErrorCode: " &$objItem.ConfigManagerErrorCode & @CRLF
    $Output&="ConfigManagerUserConfig: " &$objItem.ConfigManagerUserConfig & @CRLF
    $Output&="CreationClassName: " &$objItem.CreationClassName & @CRLF
    $Output&="Description: " &$objItem.Description & @CRLF
    $Output&="DesignCapacity: " &$objItem.DesignCapacity & @CRLF
    $Output&="DesignVoltage: " &$objItem.DesignVoltage & @CRLF
    $Output&="DeviceID: " &$objItem.DeviceID & @CRLF
    $Output&="ErrorCleared: " &$objItem.ErrorCleared & @CRLF
    $Output&="ErrorDescription: " &$objItem.ErrorDescription & @CRLF
    $Output&="EstimatedChargeRemaining: " &$objItem.EstimatedChargeRemaining & @CRLF
    $Output&="EstimatedRunTime: " &$objItem.EstimatedRunTime & @CRLF
    $Output&="ExpectedBatteryLife: " &$objItem.ExpectedBatteryLife & @CRLF
    $Output&="ExpectedLife: " &$objItem.ExpectedLife & @CRLF
    $Output&="FullChargeCapacity: " &$objItem.FullChargeCapacity & @CRLF
    $Output&="InstallDate: " & WMIDateStringToDate($objItem.InstallDate) & @CRLF
    $Output&="LastErrorCode: " &$objItem.LastErrorCode & @CRLF
    $Output&="MaxRechargeTime: " &$objItem.MaxRechargeTime & @CRLF
    $Output&="Name: " &$objItem.Name & @CRLF
    $Output&="PNPDeviceID: " &$objItem.PNPDeviceID & @CRLF
    $strPowerManagementCapabilities=$objItem.PowerManagementCapabilities(0)
    $Output&="PowerManagementCapabilities: " &$strPowerManagementCapabilities & @CRLF
    $Output&="PowerManagementSupported: " &$objItem.PowerManagementSupported & @CRLF
    $Output&="SmartBatteryVersion: " &$objItem.SmartBatteryVersion & @CRLF
    $Output&="Status: " &$objItem.Status & @CRLF
    $Output&="StatusInfo: " &$objItem.StatusInfo & @CRLF
    $Output&="SystemCreationClassName: " &$objItem.SystemCreationClassName & @CRLF
    $Output&="SystemName: " &$objItem.SystemName & @CRLF
    $Output&="TimeOnBattery: " &$objItem.TimeOnBattery & @CRLF
    $Output&="TimeToFullCharge: " &$objItem.TimeToFullCharge & @CRLF
    If Msgbox(1, "WMI-Ausgabe", $Output)=2 then ExitLoop
    $Output=""
    Next
    Else
    Msgbox(0, "WMI-Ausgabe","Keine WMI-Objekte gefunden für Klasse: " & "Win32_Battery")
    Endif

    [/autoit] [autoit][/autoit] [autoit]

    Func WMIDateStringToDate($dtmDate)
    Return (StringMid($dtmDate, 5, 2) &"/" &StringMid($dtmDate, 7, 2) &"/" &StringLeft($dtmDate, 4) & " " &StringMid($dtmDate, 9, 2) &":" &StringMid($dtmDate, 11, 2) &":" &StringMid($dtmDate,13, 2))
    EndFunc

    [/autoit]
  • Hi,
    könnte jemand mit einem Laptop Bernds Script mal testen (1x mit Batterie und 1x am Netz hängend) ???

    Danke

  • @ Tweaky
    ich habe noch einen anderen Ansatz gefunden:
    Davon ausgehend, dass eigentlich jeder moderne Laptop einen PCMCIA-Port hat kannst Du prüfen, ob folgender Reg-Schlüssel existiert.
    Da schreibt Windows Treiberinformationen rein. Der Unterschlüssel '0000' existiert nur, wenn Hardware vorhanden ;)

    Spoiler anzeigen

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E977-E325-11CE-BFC1-08002BE10318}\0000]

    MfG Schnuffel

    "Sarkasmus ist die niedrigste Form des Witzes, aber die höchste Form der Intelligenz."
    Val McDermid

    ein paar Infos ...

    Wer mehr als "nur" Hilfe benötigt, kann sich gern im Forum "Programmieranfragen" an uns wenden. Wir helfen in allen Fällen, die die Forenregeln zulassen.

    Für schnelle Hilfe benötigen wir ein ! lauffähiges ! Script, dass wir als Demonstration des Problems testen können. Wer von uns erwartet ein Teilscript erstmal lauffähig zu bekommen, der hat
    1. keine wirkliche Not
    2. keinen Respekt vor Menschen die ihm in ihrer Freizeit Ihre Hilfe anbieten
    3. oder ist einfach nur faul und meint wir coden das für ihn

    In solchen Fällen erlaube ich mir, die Anfrage einfach zu ignorieren. ;)

    • Offizieller Beitrag

    Hallo,

    es gibt scheinbar doch die Möglichkeit den Gerätetyp auszulesen und zwar mit der WMI-Klasse Win32_SystemEnclosure. Intressant ist hier der Wert ChassisTypes -> http://www.microsoft.com/technet/script…z.mspx?mfr=true


    Spoiler anzeigen
    [autoit]

    ; Erstellt von AutoIt Scriptomatic
    $wbemFlagReturnImmediately=0x10
    $wbemFlagForwardOnly=0x20
    $colItems=""
    $strComputer="localhost"
    $Output=""
    $Output&="Computer: " &$strComputer & @CRLF
    $Output&="==========================================" & @CRLF
    $objWMIService=ObjGet("winmgmts:\\" &$strComputer &"\root\CIMV2")
    $colItems=$objWMIService.ExecQuery("SELECT * FROM Win32_SystemEnclosure", "WQL", _
    $wbemFlagReturnImmediately + $wbemFlagForwardOnly)
    If IsObj($colItems) Then
    For $objItem In $colItems
    $Output&="AudibleAlarm: " &$objItem.AudibleAlarm & @CRLF
    $Output&="BreachDescription: " &$objItem.BreachDescription & @CRLF
    $Output&="CableManagementStrategy: " &$objItem.CableManagementStrategy & @CRLF
    $Output&="Caption: " &$objItem.Caption & @CRLF
    $strChassisTypes=$objItem.ChassisTypes(0)
    $Output&="ChassisTypes: " &$strChassisTypes & @CRLF
    $Output&="CreationClassName: " &$objItem.CreationClassName & @CRLF
    $Output&="CurrentRequiredOrProduced: " &$objItem.CurrentRequiredOrProduced & @CRLF
    $Output&="Depth: " &$objItem.Depth & @CRLF
    $Output&="Description: " &$objItem.Description & @CRLF
    $Output&="HeatGeneration: " &$objItem.HeatGeneration & @CRLF
    $Output&="Height: " &$objItem.Height & @CRLF
    $Output&="HotSwappable: " &$objItem.HotSwappable & @CRLF
    $Output&="InstallDate: " & WMIDateStringToDate($objItem.InstallDate) & @CRLF
    $Output&="LockPresent: " &$objItem.LockPresent & @CRLF
    $Output&="Manufacturer: " &$objItem.Manufacturer & @CRLF
    $Output&="Model: " &$objItem.Model & @CRLF
    $Output&="Name: " &$objItem.Name & @CRLF
    $Output&="NumberOfPowerCords: " &$objItem.NumberOfPowerCords & @CRLF
    $Output&="OtherIdentifyingInfo: " &$objItem.OtherIdentifyingInfo & @CRLF
    $Output&="PartNumber: " &$objItem.PartNumber & @CRLF
    $Output&="PoweredOn: " &$objItem.PoweredOn & @CRLF
    $Output&="Removable: " &$objItem.Removable & @CRLF
    $Output&="Replaceable: " &$objItem.Replaceable & @CRLF
    $Output&="SecurityBreach: " &$objItem.SecurityBreach & @CRLF
    $Output&="SecurityStatus: " &$objItem.SecurityStatus & @CRLF
    $Output&="SerialNumber: " &$objItem.SerialNumber & @CRLF
    $strServiceDescriptions=$objItem.ServiceDescriptions(0)
    $Output&="ServiceDescriptions: " &$strServiceDescriptions & @CRLF
    $strServicePhilosophy=$objItem.ServicePhilosophy(0)
    $Output&="ServicePhilosophy: " &$strServicePhilosophy & @CRLF
    $Output&="SKU: " &$objItem.SKU & @CRLF
    $Output&="SMBIOSAssetTag: " &$objItem.SMBIOSAssetTag & @CRLF
    $Output&="Status: " &$objItem.Status & @CRLF
    $Output&="Tag: " &$objItem.Tag & @CRLF
    $strTypeDescriptions=$objItem.TypeDescriptions(0)
    $Output&="TypeDescriptions: " &$strTypeDescriptions & @CRLF
    $Output&="Version: " &$objItem.Version & @CRLF
    $Output&="VisibleAlarm: " &$objItem.VisibleAlarm & @CRLF
    $Output&="Weight: " &$objItem.Weight & @CRLF
    $Output&="Width: " &$objItem.Width & @CRLF
    If Msgbox(1, "WMI-Ausgabe", $Output)=2 then ExitLoop
    $Output=""
    Next
    Else
    Msgbox(0, "WMI-Ausgabe","Keine WMI-Objekte gefunden für Klasse: " & "Win32_SystemEnclosure")
    Endif

    [/autoit] [autoit][/autoit] [autoit]

    Func WMIDateStringToDate($dtmDate)
    Return (StringMid($dtmDate, 5, 2) &"/" &StringMid($dtmDate, 7, 2) &"/" &StringLeft($dtmDate, 4) & " " &StringMid($dtmDate, 9, 2) &":" &StringMid($dtmDate, 11, 2) &":" &StringMid($dtmDate,13, 2))
    EndFunc

    [/autoit]
  • Hab auf meinem Asus X55SV-AS035C den Rückgabewert 10 bekommen, also "Notebook". Ich frag mich nur, wo der Unterschied zwischen Laptop und Notebook sein soll.

  • Also ein Kollege von mir hat mal Bernds Script getestet (Laptop Asus Core Duo 2) und einen Error kommen (welchen muß ich ihn noch fragen)

    Habe das Script so gekürzt

    Spoiler anzeigen
    [autoit]

    ; Erstellt von AutoIt Scriptomatic
    $wbemFlagReturnImmediately=0x10
    $wbemFlagForwardOnly=0x20
    $colItems=""
    $strComputer="localhost"
    $Output=""
    ;~ $Output&="Computer: " &$strComputer & @CRLF
    ;~ $Output&="==========================================" & @CRLF
    $objWMIService=ObjGet("winmgmts:\\" &$strComputer &"\root\CIMV2")
    $colItems=$objWMIService.ExecQuery("SELECT * FROM Win32_SystemEnclosure", "WQL", _
    $wbemFlagReturnImmediately + $wbemFlagForwardOnly)
    If IsObj($colItems) Then
    For $objItem In $colItems
    ;~ $Output&="AudibleAlarm: " &$objItem.AudibleAlarm & @CRLF
    ;~ $Output&="BreachDescription: " &$objItem.BreachDescription & @CRLF
    ;~ $Output&="CableManagementStrategy: " &$objItem.CableManagementStrategy & @CRLF
    ;~ $Output&="Caption: " &$objItem.Caption & @CRLF
    $strChassisTypes=$objItem.ChassisTypes(0)
    $Output&=$strChassisTypes
    ;~ $Output&="CreationClassName: " &$objItem.CreationClassName & @CRLF
    ;~ $Output&="CurrentRequiredOrProduced: " &$objItem.CurrentRequiredOrProduced & @CRLF
    ;~ $Output&="Depth: " &$objItem.Depth & @CRLF
    ;~ $Output&="Description: " &$objItem.Description & @CRLF
    ;~ $Output&="HeatGeneration: " &$objItem.HeatGeneration & @CRLF
    ;~ $Output&="Height: " &$objItem.Height & @CRLF
    ;~ $Output&="HotSwappable: " &$objItem.HotSwappable & @CRLF
    ;~ $Output&="InstallDate: " & WMIDateStringToDate($objItem.InstallDate) & @CRLF
    ;~ $Output&="LockPresent: " &$objItem.LockPresent & @CRLF
    ;~ $Output&="Manufacturer: " &$objItem.Manufacturer & @CRLF
    ;~ $Output&="Model: " &$objItem.Model & @CRLF
    ;~ $Output&="Name: " &$objItem.Name & @CRLF
    ;~ $Output&="NumberOfPowerCords: " &$objItem.NumberOfPowerCords & @CRLF
    ;~ $Output&="OtherIdentifyingInfo: " &$objItem.OtherIdentifyingInfo & @CRLF
    ;~ $Output&="PartNumber: " &$objItem.PartNumber & @CRLF
    ;~ $Output&="PoweredOn: " &$objItem.PoweredOn & @CRLF
    ;~ $Output&="Removable: " &$objItem.Removable & @CRLF
    ;~ $Output&="Replaceable: " &$objItem.Replaceable & @CRLF
    ;~ $Output&="SecurityBreach: " &$objItem.SecurityBreach & @CRLF
    ;~ $Output&="SecurityStatus: " &$objItem.SecurityStatus & @CRLF
    ;~ $Output&="SerialNumber: " &$objItem.SerialNumber & @CRLF
    ;~ $strServiceDescriptions=$objItem.ServiceDescriptions(0)
    ;~ $Output&="ServiceDescriptions: " &$strServiceDescriptions & @CRLF
    ;~ $strServicePhilosophy=$objItem.ServicePhilosophy(0)
    ;~ $Output&="ServicePhilosophy: " &$strServicePhilosophy & @CRLF
    ;~ $Output&="SKU: " &$objItem.SKU & @CRLF
    ;~ $Output&="SMBIOSAssetTag: " &$objItem.SMBIOSAssetTag & @CRLF
    ;~ $Output&="Status: " &$objItem.Status & @CRLF
    ;~ $Output&="Tag: " &$objItem.Tag & @CRLF
    ;~ $strTypeDescriptions=$objItem.TypeDescriptions(0)
    ;~ $Output&="TypeDescriptions: " &$strTypeDescriptions & @CRLF
    ;~ $Output&="Version: " &$objItem.Version & @CRLF
    ;~ $Output&="VisibleAlarm: " &$objItem.VisibleAlarm & @CRLF
    ;~ $Output&="Weight: " &$objItem.Weight & @CRLF
    ;~ $Output&="Width: " &$objItem.Width & @CRLF
    If Msgbox(1, "", $Output)=2 then ExitLoop
    $Output=""
    Next
    Else
    Msgbox(0, "WMI-Ausgabe","Keine WMI-Objekte gefunden für Klasse: " & "Win32_SystemEnclosure")
    Endif

    [/autoit] [autoit][/autoit] [autoit]

    Func WMIDateStringToDate($dtmDate)
    Return (StringMid($dtmDate, 5, 2) &"/" &StringMid($dtmDate, 7, 2) &"/" &StringLeft($dtmDate, 4) & " " &StringMid($dtmDate, 9, 2) &":" &StringMid($dtmDate, 11, 2) &":" &StringMid($dtmDate,13, 2))
    EndFunc

    [/autoit]
  • Hi,
    Greenhorns Script (Post 7) funktioniert nicht so ganz mit XP Media Center.
    Es gibt "XP Professional" aus.

    Kann dies bitte einer von euch mal testen?

  • wenn ich es richtig verstanden habe am frühen Morgen, dann meinst Du nicht dieses hier, oder?
    autoit.de/wcf/attachment/2378/

    Das gibt es nämlich hier bereits im Forum.

    Crazy-A

    Lieben Gruß,
    Alina

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Geheime Information: ;)
    k3mrwmIBHejryPvylQSFieDF5f3VOnk6iLAVBGVhKQegrFuWr3iraNIblLweSW4WgqI0SrRbS7U5jI3sn50R4a15Cthu1bEr

  • Hi,
    bei diesem Script kommt auf einem Laptop eine Fehlermeldung

    Spoiler anzeigen
    [autoit]

    ; Erstellt von AutoIt Scriptomatic
    $wbemFlagReturnImmediately=0x10
    $wbemFlagForwardOnly=0x20
    $colItems=""
    $strComputer="localhost"
    $Output=""
    ;~ $Output&="Computer: " &$strComputer & @CRLF
    ;~ $Output&="==========================================" & @CRLF
    $objWMIService=ObjGet("winmgmts:\\" &$strComputer &"\root\CIMV2")
    $colItems=$objWMIService.ExecQuery("SELECT * FROM Win32_SystemEnclosure", "WQL", _
    $wbemFlagReturnImmediately + $wbemFlagForwardOnly)
    If IsObj($colItems) Then
    For $objItem In $colItems
    ;~ $Output&="AudibleAlarm: " &$objItem.AudibleAlarm & @CRLF
    ;~ $Output&="BreachDescription: " &$objItem.BreachDescription & @CRLF
    ;~ $Output&="CableManagementStrategy: " &$objItem.CableManagementStrategy & @CRLF
    ;~ $Output&="Caption: " &$objItem.Caption & @CRLF
    $strChassisTypes=$objItem.ChassisTypes(0)
    $Output&=$strChassisTypes
    ;~ $Output&="CreationClassName: " &$objItem.CreationClassName & @CRLF
    ;~ $Output&="CurrentRequiredOrProduced: " &$objItem.CurrentRequiredOrProduced & @CRLF
    ;~ $Output&="Depth: " &$objItem.Depth & @CRLF
    ;~ $Output&="Description: " &$objItem.Description & @CRLF
    ;~ $Output&="HeatGeneration: " &$objItem.HeatGeneration & @CRLF
    ;~ $Output&="Height: " &$objItem.Height & @CRLF
    ;~ $Output&="HotSwappable: " &$objItem.HotSwappable & @CRLF
    ;~ $Output&="InstallDate: " & WMIDateStringToDate($objItem.InstallDate) & @CRLF
    ;~ $Output&="LockPresent: " &$objItem.LockPresent & @CRLF
    ;~ $Output&="Manufacturer: " &$objItem.Manufacturer & @CRLF
    ;~ $Output&="Model: " &$objItem.Model & @CRLF
    ;~ $Output&="Name: " &$objItem.Name & @CRLF
    ;~ $Output&="NumberOfPowerCords: " &$objItem.NumberOfPowerCords & @CRLF
    ;~ $Output&="OtherIdentifyingInfo: " &$objItem.OtherIdentifyingInfo & @CRLF
    ;~ $Output&="PartNumber: " &$objItem.PartNumber & @CRLF
    ;~ $Output&="PoweredOn: " &$objItem.PoweredOn & @CRLF
    ;~ $Output&="Removable: " &$objItem.Removable & @CRLF
    ;~ $Output&="Replaceable: " &$objItem.Replaceable & @CRLF
    ;~ $Output&="SecurityBreach: " &$objItem.SecurityBreach & @CRLF
    ;~ $Output&="SecurityStatus: " &$objItem.SecurityStatus & @CRLF
    ;~ $Output&="SerialNumber: " &$objItem.SerialNumber & @CRLF
    ;~ $strServiceDescriptions=$objItem.ServiceDescriptions(0)
    ;~ $Output&="ServiceDescriptions: " &$strServiceDescriptions & @CRLF
    ;~ $strServicePhilosophy=$objItem.ServicePhilosophy(0)
    ;~ $Output&="ServicePhilosophy: " &$strServicePhilosophy & @CRLF
    ;~ $Output&="SKU: " &$objItem.SKU & @CRLF
    ;~ $Output&="SMBIOSAssetTag: " &$objItem.SMBIOSAssetTag & @CRLF
    ;~ $Output&="Status: " &$objItem.Status & @CRLF
    ;~ $Output&="Tag: " &$objItem.Tag & @CRLF
    ;~ $strTypeDescriptions=$objItem.TypeDescriptions(0)
    ;~ $Output&="TypeDescriptions: " &$strTypeDescriptions & @CRLF
    ;~ $Output&="Version: " &$objItem.Version & @CRLF
    ;~ $Output&="VisibleAlarm: " &$objItem.VisibleAlarm & @CRLF
    ;~ $Output&="Weight: " &$objItem.Weight & @CRLF
    ;~ $Output&="Width: " &$objItem.Width & @CRLF
    If Msgbox(1, "", $Output)=2 then ExitLoop
    $Output=""
    Next
    Else
    Msgbox(0, "WMI-Ausgabe","Keine WMI-Objekte gefunden für Klasse: " & "Win32_SystemEnclosure")
    Endif

    [/autoit] [autoit][/autoit] [autoit]

    Func WMIDateStringToDate($dtmDate)
    Return (StringMid($dtmDate, 5, 2) &"/" &StringMid($dtmDate, 7, 2) &"/" &StringLeft($dtmDate, 4) & " " &StringMid($dtmDate, 9, 2) &":" &StringMid($dtmDate, 11, 2) &":" &StringMid($dtmDate,13, 2))
    EndFunc

    [/autoit]

    dies ist die Fehlermeldung:

    Zitat

    C:\PC-Typ.au3 (10) : ==> Variable must be of type "Object".:
    $colItems=$objWMIService.ExecQuery("SELECT * FROM Win32_SystemEnclosure", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)
    $colItems=$objWMIService^ ERROR