1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. Mahagon

Beiträge von Mahagon

  • Pingen und Logfile

    • Mahagon
    • 6. Juni 2012 um 09:32

    Du Loggst ja auch nur die Pingzeiten ;)

    Spoiler anzeigen
    [autoit]

    #comments-start-----------------------------------------------------------------------------------------------------------
    ; Author: Raylow (Special thx to "funkey" --> http://www.autoit.de)
    ; Date: 23.04.2009
    ; Script Version: 2.1.0.1
    ;
    ;
    #comments-end-----------------------------------------------------------------------------------------------------------

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

    #NoTrayIcon
    #region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_icon=Netzwerkverbindung.ico
    #AutoIt3Wrapper_Res_Description=Application to ping a host periodically
    #AutoIt3Wrapper_Res_Fileversion=2.1.0.1
    #AutoIt3Wrapper_Res_Icon_Add=paste.ico
    #endregion ;**** Directives created by AutoIt3Wrapper_GUI ****

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

    #include <GUIConstantsEx.au3>
    #include <ButtonConstants.au3>
    #include <File.au3>
    #include <windowsconstants.au3>

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

    Global $ping = -1, $pingCopy = -2
    Global $intervall = "60000"
    Global $date = @YEAR & "-" & @MON & "-" & @MDAY
    Global $stopped = 0
    Global $path = ""
    $StartFolder = "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"

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

    Opt("GUIOnEventMode", 1)

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

    $Form1_1 = GUICreate("Ping-Assi", 247, 145, 240, 300)
    GUISetOnEvent($GUI_EVENT_CLOSE, "Form1_1Close")
    GUISetState(@SW_SHOW)

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

    $Label1 = GUICtrlCreateLabel("Host to ping", 8, 8, 80, 17)
    $Label2 = GUICtrlCreateLabel("Intervall", 160, 8, 38, 17)
    $Label3 = GUICtrlCreateLabel("Logfile Path", 8, 58, 98, 17)

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

    Global $Input1 = GUICtrlCreateInput("", 8, 24, 105, 21)
    ControlFocus($Form1_1, "", $Input1)
    Global $Input2 = GUICtrlCreateInput($intervall, 160, 24, 32, 21)
    Global $Input3 = GUICtrlCreateInput("", 8, 74, 194, 21)

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

    Global $Button1 = GUICtrlCreateButton("Start", 8, 104, 114, 30, $BS_DEFPUSHBUTTON)
    GUICtrlSetOnEvent(-1, "Button1Click")
    Global $Button2 = GUICtrlCreateButton("Stop", 126, 104, 114, 30)
    GUICtrlSetOnEvent(-1, "Button2Click")
    GUICtrlSetState($Button2, $GUI_DISABLE)
    Global $Button3 = GUICtrlCreateButton("...", 205, 74, 35, 21)
    GUICtrlSetOnEvent(-1, "Button3Click")
    Global $Button4 = GUICtrlCreateButton("Clip", 115, 24, 35, 21, $BS_ICON)
    GUICtrlSetImage($Button4, @ScriptFullPath, -5, 0)
    GUICtrlSetOnEvent(-1, "Button4Click")
    Global $Button5 = GUICtrlCreateButton("?", 225, 8, 15, 17)
    GUICtrlSetOnEvent(-1, "Button5Click")

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

    While 1
    Sleep(5000)
    WEnd

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

    Func Button5Click()
    MsgBox(64, "About Ping-Assi", "This programm was written by Raylow ([email='raylow.com@gmail.com'][/email]). Special thx to funkey --> http://www.autoit.de")
    ControlFocus($Form1_1, "", $Input1)
    EndFunc ;==>Button5Click

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

    Func Button4Click()
    GUICtrlSetData($Input1, ClipGet())
    EndFunc ;==>Button4Click

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

    Func Button3Click()
    Dim $fileName

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

    If GUICtrlRead($Input1) = "" Then
    $var = FileSaveDialog("Save logfile..", $StartFolder, "Logfile (*.*)", 16, "log.txt")
    Else
    $var = FileSaveDialog("Save logfile..", $StartFolder, "Logfile (*.*)", 16, StringReplace(GUICtrlRead($Input1), ".", "_") & ".txt")
    EndIf

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

    If @error Then

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

    Else
    GUICtrlSetData($Input3, $var)
    EndIf
    EndFunc ;==>Button3Click

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

    Func Button1Click()
    If GUICtrlRead($Input1) <> "" Then
    Global $IP = StringReplace(GUICtrlRead($Input1), ".", "_")
    If GUICtrlRead($Input3) = "" Then
    Global $logfile = $IP & ".txt"
    Else
    Global $logfile = GUICtrlRead($Input3)
    EndIf

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

    Local $IPAdresse = GUICtrlRead($Input1)
    $ping = Ping($IPAdresse, 1800)
    _FileWriteLog($logfile, '----- ' & 'STARTED' & ' -----')
    _FileWriteLog($logfile, $IPAdresse & ' | ' & $ping)
    $pingCopy = $ping

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

    AdlibRegister('_Zyklus', GUICtrlRead($Input2 * 1000))
    GUICtrlSetState($Button1, $GUI_DISABLE)
    GUICtrlSetState($Button2, $GUI_ENABLE)
    GUICtrlSetState($Button3, $GUI_DISABLE)
    GUICtrlSetState($Button4, $GUI_DISABLE)
    GUICtrlSetState($Input1, $GUI_DISABLE)
    GUICtrlSetState($Input2, $GUI_DISABLE)
    GUICtrlSetState($Input3, $GUI_DISABLE)
    Else
    MsgBox(16, "Missing Input", "Be sure to set the host to ping and an intervall!")
    EndIf
    EndFunc ;==>Button1Click

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

    Func Button2Click()
    _FileWriteLog($logfile, '----- ' & 'STOPPED' & ' -----')
    $stopped = 2
    AdlibUnRegister()
    GUICtrlSetState($Button1, $GUI_ENABLE)
    GUICtrlSetState($Button2, $GUI_DISABLE)
    GUICtrlSetState($Button3, $GUI_ENABLE)
    GUICtrlSetState($Button4, $GUI_ENABLE)
    GUICtrlSetState($Input1, $GUI_ENABLE)
    GUICtrlSetState($Input2, $GUI_ENABLE)
    GUICtrlSetState($Input3, $GUI_ENABLE)
    EndFunc ;==>Button2Click

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

    Func _Zyklus()
    Local $IPAdresse = GUICtrlRead($Input1)
    $ping = Ping($IPAdresse)
    $stopped = 1
    ;~ If $ping <> $pingCopy Then _FileWriteLog($logfile, $IPAdresse & ' | ' & $ping)
    If $ping = 0 Then _FileWriteLog($logfile, $IPAdresse & ' | Host nicht erreichbar')
    $pingCopy = $ping
    EndFunc ;==>_Zyklus

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

    Func Form1_1Close()
    If $stopped = 1 Then
    _FileWriteLog($logfile, '----- ' & 'STOPPED' & ' -----')
    Else

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

    EndIf

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

    Exit
    EndFunc ;==>Form1_1Close

    [/autoit]

    Damit sollte es klappen :)

  • leere Active Directory Felder im Personen Dokument suchen gegebenfalls ausfüllen

    • Mahagon
    • 31. Mai 2012 um 08:41

    Ich würde es einmal mit der UDF von water versuchen :)

    https://autoit.de/index.php?page=Thread&amp;threadID=15939

    Damit sollte es eigentlich problemlos gehen :)

  • Selektierte Elemente aus ListView löschen geht nicht...

    • Mahagon
    • 15. Mai 2012 um 16:41

    Du Benutzt die Control ID, solltest aber das Handle benutzen (Siehe Hilfe zu _GUICtrlListView_DeleteItemsSelected :D)

    Spoiler anzeigen
    [autoit]

    #Include <GuiListView.au3>
    #include <GuiConstantsEx.au3>
    #include <Array.au3>

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

    Opt("GUIOnEventMode", 1)

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

    ;Suchergebnisfenster
    #Region ### START Koda GUI section ### Form=Q:\Bosch_CR\BAL\ARCHIV\ProgrammeTools\Bosch_Taskleiste\docucheck\forms\gui_suchmaske.kxf
    $gui_suchfelder = GUICreate("Suchfelder", 271, 456, -1, -1)
    $test = GUICtrlCreateListView("Feldname", 8, 32, 249, 390)
    $hTest = GUICtrlGetHandle($test)
    $button_LIdelete = GUICtrlCreateButton("Entfernen", 8, 428, 83, 25,0)
    $label_suchfelder = GUICtrlCreateLabel("In Suche einbezogene Felder", 8, 8, 150, 17)
    _GUICtrlListView_AddItem($hTest, "Text 1")
    _GUICtrlListView_AddItem($hTest, "Text 2")
    GUICtrlSetOnEvent($button_LIdelete, "Liste")
    GUISetOnEvent($GUI_EVENT_CLOSE, "Close")
    GUISetState(@SW_SHOW)

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

    Func Liste()
    global $test
    ;$mnr_temp=_GUICtrlListView_GetSelectedIndices($test, true)
    ;$mnr_temp=_GUICtrlListView_GetItemText($test,$mnr_temp[1])
    ;MsgBox(0, "Selektiert", $mnr_temp)
    _GUICtrlListView_DeleteItemsSelected($hTest)
    EndFunc

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

    Func Close()
    ; Hauptfenster des Programms...
    If @GUI_WinHandle = $gui_suchfelder Then
    ; Programm wird beendet
    Exit
    EndIf
    EndFunc ;==>Close

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

    While 1
    Sleep(1000)
    WEnd

    [/autoit]
  • Jeder Befehl im Bezug mit dem Internet funktioniert nicht mehr (z.B: InetGet)

    • Mahagon
    • 1. November 2011 um 14:24

    Er befindet sich ja auch unter "Windows Funktionen aktivieren und deaktivieren" in der Seitenleiste bei Programme und Funktionen.

  • Endlos Emails abrufen, bei neuer Email Script fortsetzen. WIE?

    • Mahagon
    • 1. November 2011 um 10:14

    Das könntest du über die Pop3 UDF versuchen: http://www.autoitscript.com/forum/topic/22…o-the-1939-rfc/
    Für Anhänge gab es hier im Forum auch irgendwo eine UDF (versuch es mal über die Forensuche)

  • CMD Befehl mit Adminrechten als Poweruser senden

    • Mahagon
    • 19. Oktober 2011 um 20:24

    Sind das PCs in einer Domain, dann nimm doch GPO/Anmeldeskripte zum verteilen der Software.
    Falls du PCs innerhalb eines Netzwerkes Fernwarten willst nimm lieber VNC oder mach es über die Remoteunterstützung :)
    Wobei derjenige, welchen du gerade fernsteuern willst vorher informiert werden sollte.

  • Scite Menüeinräge fehlen

    • Mahagon
    • 12. September 2011 um 13:48

    Der mitgelieferte Editor ist abgespeckt. Du musst Scite zusätzlich installieren :)

    http://www.autoitscript.com/site/autoit-sc…itor/downloads/

  • batch starten beenden nach uhrzeit

    • Mahagon
    • 17. August 2011 um 11:42

    So sollte das eigentlich klappen:

    $pid = Run('cmd.exe /c "' & @ScriptDir & '\test.bat"')

  • batch starten beenden nach uhrzeit

    • Mahagon
    • 17. August 2011 um 09:47

    Ich würde das Script mit Run starten. Da bekommste eine pid zurück. Diese kannste dann beenden. Dann erwischt du auch nicht ein anderes Script was zufällig gerade läuft.

  • _BIOS UDF - Release 16.8.11

    • Mahagon
    • 17. August 2011 um 09:44

    Du solltest vielleicht deine Funktionen ein wenig mehr beschreiben :)
    Dafür eignet sich z.B. das DescribeIt von Seubo ganz gut.

    Spoiler anzeigen
    [autoit]


    #cs
    This UDF is made for using the Windows Management Instrumentation in AutoIt V.3
    The content of this work is licensed under Creative Commons license.
    Der Inhalt dieses Werkes ist lizensiert unter der Creative Commons Lizenz.
    #ce

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

    ; Last Change 16.06.2010

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

    ; #INDEX# =========================================================================================
    ; Win32_BIOS Functions
    ; ~~~~~~~~~~~~~~~~~~~~
    ; _WinWMI_BIOS_GetCharacteristics()
    ; _WinWMI_BIOS_GetVersion()
    ; _WinWMI_BIOS_GetInformation()
    ; _WinWMI_BIOS_GetLanguages()
    ;
    ; =================================================================================================

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

    ; #CONSTANTS# =====================================================================================
    ; See http://msdn.microsoft.com/de-de/library/ms974579.aspx for further information (German)
    ;~ Global Const $wbemFlagReturnImmediately = 0x10
    ;~ Global Const $wbemFlagForwardOnly = 0x20
    ; =================================================================================================

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

    ; #FUNCTION# ======================================================================================
    ; Name .............: _WinWMI_BIOS_GetCharacteristics()
    ; Description ......: Returns an Array of BIOS characteristics supported by the system as defined by the System Management BIOS Reference Specification.
    ; Syntax ...........: _WinWMI_BIOS_GetCharacteristics(Const[ $sComputer = "127.0.0.1"])
    ; Parameters .......: Const $sComputer - [optional] Target Computer (default:"127.0.0.1")
    ; Return values ....: Success - Returns an Array with the BiosCharacteristics
    ; Failure - 0 Sets @error to:
    ; |-1 Connection failed
    ; |-2 WMI Class not found/no access
    ; |-3 No matches or more than one found
    ; Author ...........: Daniel Jacobs
    ; Link .............: http://msdn.microsoft.com/en-us/library/aa394077(VS.85).aspx
    ; Link (German).....: http://www.scriptinternals.de/new/ger/suppor…_Win32_BIOS.htm
    ; Au3.api extension.: _WinWMI_BIOS_GetCharacteristics( [ "Target Computer"] ) Returns an Array with the BIOS characteristics. ( Requires: #include <_WinWMI_BIOS.au3> )
    ; =================================================================================================

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

    Func _WinWMI_BIOS_GetCharacteristics(Const $sComputer = "127.0.0.1")
    $oWMI = ObjGet("winmgmts:{impersonationLevel=impersonate}!\" & $sComputer & "rootCIMV2")
    If IsObj($oWMI) = 0 Then Return SetError(-1, @error, 0)
    $oList = $oWMI.ExecQuery("SELECT BiosCharacteristics FROM Win32_BIOS", "WQL")
    If IsObj($oList) = 0 Then Return SetError(-2, @error, 0)
    If $oList.Count <> 1 Then Return SetError(-3, @error, 0)
    Local $sBiosCharacteristics = ""
    For $oItem In $oList
    For $iCount = 0 To UBound($oItem.BiosCharacteristics) - 1
    Switch $oItem.BiosCharacteristics($iCount)
    Case 0
    $sBiosCharacteristics &= "reserved|"
    Case 1
    $sBiosCharacteristics &= "reserved|"
    Case 2
    $sBiosCharacteristics &= "unknown|"
    Case 3
    $sBiosCharacteristics &= "BIOS characteristics not supported|"
    Case 4
    $sBiosCharacteristics &= "ISA supported|"
    Case 5
    $sBiosCharacteristics &= "MCA supported|"
    Case 6
    $sBiosCharacteristics &= "EISA supported|"
    Case 7
    $sBiosCharacteristics &= "PCI supported|"
    Case 8
    $sBiosCharacteristics &= "PC Card (PCMCIA) supported|"
    Case 9
    $sBiosCharacteristics &= "Plug and Play supported|"
    Case 10
    $sBiosCharacteristics &= "APM is supported|"
    Case 11
    $sBiosCharacteristics &= "BIOS upgradable (Flash)|"
    Case 12
    $sBiosCharacteristics &= "BIOS shadowing allowed|"
    Case 13
    $sBiosCharacteristics &= "VL-VESA supported|"
    Case 14
    $sBiosCharacteristics &= "ESCD support available|"
    Case 15
    $sBiosCharacteristics &= "Boot from CD supported|"
    Case 16
    $sBiosCharacteristics &= "Selectable boot supported|"
    Case 17
    $sBiosCharacteristics &= "BIOS ROM socketed|"
    Case 18
    $sBiosCharacteristics &= "Boot from PC card (PCMCIA) supported|"
    Case 19
    $sBiosCharacteristics &= "EDD (Enhanced Disk Drive) specification supported|"
    Case 20
    $sBiosCharacteristics &= "Int 13h, Japanese Floppy for NEC 9800 1.2mb (3.5, 1k b/s, 360 RPM) supported|"
    Case 21
    $sBiosCharacteristics &= "Int 13h, Japanese Floppy for Toshiba 1.2mb (3.5, 360 RPM) supported|"
    Case 22
    $sBiosCharacteristics &= "Int 13h, 5.25 / 360 KB floppy services supported|"
    Case 23
    $sBiosCharacteristics &= "Int 13h, 5.25 /1.2MB floppy services supported|"
    Case 24
    $sBiosCharacteristics &= "Int 13h 3.5 / 720 KB floppy services supported|"
    Case 25
    $sBiosCharacteristics &= "Int 13h, 3.5 / 2.88 MB floppy services supported|"
    Case 26
    $sBiosCharacteristics &= "Int 5h, print screen service supported|"
    Case 27
    $sBiosCharacteristics &= "Int 9h, 8042 keyboard services supported|"
    Case 28
    $sBiosCharacteristics &= "Int 14h, serial services supported|"
    Case 29
    $sBiosCharacteristics &= "Int 17h, printer services supported|"
    Case 30
    $sBiosCharacteristics &= "Int 10h, CGA/Mono video aervices supported|"
    Case 31
    $sBiosCharacteristics &= "NEC PC-98|"
    Case 32
    $sBiosCharacteristics &= "ACPI supported|"
    Case 33
    $sBiosCharacteristics &= "USB Legacy supported|"
    Case 34
    $sBiosCharacteristics &= "AGP supported|"
    Case 35
    $sBiosCharacteristics &= "I2O boot supported|"
    Case 36
    $sBiosCharacteristics &= "LS-120 boot supported|"
    Case 37
    $sBiosCharacteristics &= "ATAPI ZIP drive boot supported|"
    Case 38
    $sBiosCharacteristics &= "1394 boot supported|"
    Case 39
    $sBiosCharacteristics &= "Smart battery supported|"
    EndSwitch
    If $oItem.BiosCharacteristics($iCount) > 40 And $oItem.BiosCharacteristics($iCount) < 47 Then $sBiosCharacteristics &= "Reserved for BIOS vendor|"
    If $oItem.BiosCharacteristics($iCount) > 48 Then $sBiosCharacteristics &= "Reserved for system vendor|"
    Next
    Next
    Return StringSplit(StringTrimRight($sBiosCharacteristics, 1), "|", 2)
    EndFunc ;==>_WinWMI_BIOS_GetCharacteristics

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

    ; #FUNCTION# ======================================================================================
    ; Name .............: _WinWMI_BIOS_GetVersion()
    ; Description ......: Description
    ; Syntax ...........: _WinWMI_BIOS_GetVersion(Const[ $sComputer = "127.0.0.1"])
    ; Parameters .......: Const $sComputer - [optional] Target Computer (default:"127.0.0.1")
    ; Return values ....: Success - Returns an Array with the BiosVersion
    ; Failure - 0 Sets @error to:
    ; |-1 Connection failed
    ; |-2 WMI Class not found/no access
    ; |-3 No matches or more than one found
    ; Author ...........: Daniel Jacobs
    ; Link .............: http://msdn.microsoft.com/en-us/library/aa394077(VS.85).aspx
    ; Link (German).....: http://www.scriptinternals.de/new/ger/suppor…_Win32_BIOS.htm
    ; Au3.api extension.: _WinWMI_BIOS_GetVersion( [ "Target Computer"] ) Returns an Array with the BIOSVersion. ( Requires: #include <_WinWMI_BIOS.au3> )
    ; =================================================================================================

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

    Func _WinWMI_BIOS_GetVersion(Const $sComputer = "127.0.0.1")
    $oWMI = ObjGet("winmgmts:{impersonationLevel=impersonate}!\" & $sComputer & "rootCIMV2")
    If IsObj($oWMI) = 0 Then Return SetError(-1, @error, 0)
    $oList = $oWMI.ExecQuery("SELECT BIOSVersion FROM Win32_BIOS", "WQL")
    If IsObj($oList) = 0 Then Return SetError(-2, @error, 0)
    If $oList.Count <> 1 Then Return SetError(-3, @error, 0)
    For $oItem In $oList
    Local $aReturn[UBound($oItem.BIOSVersion)]
    For $iCount = 0 To UBound($oItem.BIOSVersion) - 1
    $aReturn[$iCount] = $oItem.BIOSVersion($iCount)
    Next
    Next
    Return $aReturn
    EndFunc ;==>_WinWMI_BIOS_GetVersion

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

    ; #FUNCTION# ======================================================================================
    ; Name .............: _WinWMI_BIOS_GetInformation()
    ; Description ......: Returns the non-Array attributes of the Win32_BIOS Class in an 1D Array
    ; Syntax ...........: _WinWMI_BIOS_GetInformation(Const[ $sFields = "SMBIOSBIOSVersion", Const[ $sComputer = "127.0.0.1"]])
    ; Parameters .......: Const $sFields - [optional] BIOSinformation seperated by comma (default:"SMBIOSBIOSVersion")
    ; Const $sComputer - [optional] Target Computer (default:"127.0.0.1")
    ; Return values ....: Success - Returns an Array with the non-Array attributes of the Win32_BIOS Class
    ; Failure - 0 Sets @error to:
    ; |-1 Connection failed
    ; |-2 WMI Class not found/no access
    ; |-3 No matches found
    ; Author ...........: Daniel Jacobs
    ; Link .............: http://msdn.microsoft.com/en-us/library/aa394077(VS.85).aspx
    ; Link (German).....: http://www.scriptinternals.de/new/ger/suppor…_Win32_BIOS.htm
    ; Au3.api extension.: _WinWMI_BIOS_GetInformation( [ [ "Fields" [, "Target Computer"]]] ) Returns the non-Array attributes of the Win32_BIOS Class in an 1D Array. ( Requires: #include <_WinWMI_BIOS.au3> )
    ; =================================================================================================

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

    Func _WinWMI_BIOS_GetInformation(Const $sFields = "SMBIOSBIOSVersion", Const $sComputer = "127.0.0.1")
    $oWMI = ObjGet("winmgmts:{impersonationLevel=impersonate}!\" & $sComputer & "rootCIMV2")
    If IsObj($oWMI) = 0 Then Return SetError(-1, @error, 0)
    $oList = $oWMI.ExecQuery("SELECT " & $sFields & " FROM Win32_BIOS", "WQL")
    If IsObj($oList) = 0 Then Return SetError(-2, @error, 0)
    $aFields = StringSplit($sFields, ",", 2)
    If $oList.Count = 0 Then Return SetError(-3, @error, 0)
    Local $aReturn[UBound($aFields)]
    For $oItem In $oList
    With $oItem
    For $iFields = 0 To UBound($aFields) - 1
    Switch $aFields[$iFields]
    Case "BuildNumber"
    $aReturn[$iFields] = .BuildNumber
    Case "Caption"
    $aReturn[$iFields] = .Caption
    Case "CodeSet"
    $aReturn[$iFields] = .CodeSet
    Case "CurrentLanguage"
    $aReturn[$iFields] = .CurrentLanguage
    Case "Description"
    $aReturn[$iFields] = .Description
    Case "IdentificationCode"
    $aReturn[$iFields] = .IdentificationCode
    Case "InstallableLanguages"
    $aReturn[$iFields] = .InstallableLanguages
    Case "InstallDate"
    $aReturn[$iFields] = .InstallDate
    Case "LanguageEdition"
    $aReturn[$iFields] = .LanguageEdition
    Case "Manufacturer"
    $aReturn[$iFields] = .Manufacturer
    Case "Name"
    $aReturn[$iFields] = .Name
    Case "OtherTargetOS"
    $aReturn[$iFields] = .OtherTargetOS
    Case "PrimaryBIOS"
    $aReturn[$iFields] = .PrimaryBIOS
    Case "SerialNumber"
    $aReturn[$iFields] = .SerialNumber
    Case "SMBIOSBIOSVersion"
    $aReturn[$iFields] = .SMBIOSBIOSVersion
    Case "SMBIOSMajorVersion"
    $aReturn[$iFields] = .SMBIOSMajorVersion
    Case "SMBIOSMinorVersion"
    $aReturn[$iFields] = .SMBIOSMinorVersion
    Case "SMBIOSPresent"
    $aReturn[$iFields] = .SMBIOSPresent
    Case "SoftwareElementID"
    $aReturn[$iFields] = .SoftwareElementID
    Case "SoftwareElementState"
    $aReturn[$iFields] = .SoftwareElementState
    Case "Status"
    $aReturn[$iFields] = .Status
    Case "TargetOperatingSystem"
    $aReturn[$iFields] = .TargetOperatingSystem
    Case "Version"
    $aReturn[$iFields] = .Version
    EndSwitch
    Next
    EndWith
    Next
    Return $aReturn
    EndFunc ;==>_WinWMI_BIOS_GetInformation

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

    ; #FUNCTION# ======================================================================================
    ; Name .............: _WinWMI_BIOS_GetLanguages()
    ; Description ......: Array of names of available BIOS-installable languages.
    ; Syntax ...........: _WinWMI_BIOS_GetLanguages(Const[ $sComputer = "127.0.0.1"])
    ; Parameters .......: Const $sComputer - [optional] Target Computer (default:"127.0.0.1")
    ; Return values ....: Success - Returns an Array with the ListOfLanguages
    ; Failure - 0 Sets @error to:
    ; |-1 Connection failed
    ; |-2 WMI Class not found/no access
    ; |-3 No matches or more than one found
    ; Author ...........: Daniel Jacobs
    ; Link .............: http://msdn.microsoft.com/en-us/library/aa394077(VS.85).aspx
    ; Link (German).....: http://www.scriptinternals.de/new/ger/suppor…_Win32_BIOS.htm
    ; Au3.api extension.: _WinWMI_BIOS_GetLanguages( [ "Target Computer"] ) Returns an Array of names of available BIOS-installable languages. ( Requires: #include <_WinWMI_BIOS.au3> )
    ; =================================================================================================

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

    Func _WinWMI_BIOS_GetLanguages(Const $sComputer = "127.0.0.1")
    $oWMI = ObjGet("winmgmts:{impersonationLevel=impersonate}!\" & $sComputer & "rootCIMV2")
    If IsObj($oWMI) = 0 Then Return SetError(-1, @error, 0)
    $oList = $oWMI.ExecQuery("SELECT ListOfLanguages FROM Win32_BIOS", "WQL")
    If IsObj($oList) = 0 Then Return SetError(-2, @error, 0)
    If $oList.Count <> 1 Then Return SetError(-3, @error, 0)
    For $oItem In $oList
    Local $aReturn[UBound($oItem.ListOfLanguages)]
    For $iCount = 0 To UBound($oItem.ListOfLanguages) - 1
    $aReturn[$iCount] = $oItem.ListOfLanguages($iCount)
    Next
    Next
    Return $aReturn
    EndFunc ;==>_WinWMI_BIOS_GetLanguages

    [/autoit]
  • Outlook 2010 Konten von Acronis Backup wiederherstellen

    • Mahagon
    • 8. August 2011 um 12:20

    Alternativ: Ich habe gute Erfahrungen mit MOBackup gemacht (gibt es als Konzernlizenz)
    Das kannst du so einplanen, dass es vor deinem AcronisBackup läuft :)

  • Registry Eintrag exportieren

    • Mahagon
    • 26. Juli 2011 um 14:11

    Hört sich an, als ob die UAC aktiv wäre.

    Versuch es einmal mit einem #RequireAdmin im Script

  • Inhalt eines Dos-Fenster auslesen

    • Mahagon
    • 22. Juli 2011 um 13:28

    Schau dir mal das Beispiel in der Hilfe zu StdoutRead an :)

  • Bitte keine .rars und defekte Downloadlinks mehr

    • Mahagon
    • 23. Juni 2011 um 09:41

    7zip Portable ;)
    (Winrar würde ich nichtmal mehr installieren, wenn mans darf -> kostenpflichtig und überladen)

  • Autologon über Registry bei Win7 64bit

    • Mahagon
    • 22. Juni 2011 um 09:34

    Zitat aus der Hilfe

    Zitat

    When running on 64-bit Windows if you want to write a key or value specific to the 64-bit environment you have to suffix the HK... with 64 i.e. HKLM64.

    ;)

  • shell.explorer

    • Mahagon
    • 11. Juni 2011 um 14:51

    Würde mal behaupten, dass es mit GDI+ klappt, jedoch bin ich da nicht so sehr bewandert ;)

  • shell.explorer

    • Mahagon
    • 11. Juni 2011 um 13:05

    Warum nicht einfach eine AutoIt Gui mit nem embedded IE ?
    Da kannst dir dann einfach deine Buttons in eine Leiste machen o.ä.

    Spoiler anzeigen
    [autoit]

    $obj = ObjCreate("shell.Explorer.2")
    $hGui = GUICreate("Form1", @DesktopWidth, @DesktopHeight - 80)
    $cFav = GUICtrlCreateMenu("Favoriten")
    $cAutoit = GUICtrlCreateMenuItem("Autoit.de", $cFav)
    $cGoogle = GUICtrlCreateMenuItem("Google.de", $cFav)
    GUICtrlCreateObj($obj, 0, 0, @DesktopWidth, @DesktopHeight - 80)
    $obj.navigate("google.de")
    GUISetState(@SW_SHOW)

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case -3
    Exit
    Case $cAutoit
    $obj.navigate("www.autoit.de")
    Case $cGoogle
    $obj.navigate("www.google.de")
    EndSwitch
    WEnd

    [/autoit]
  • ODBC - Firebird SQL Errorhandling

    • Mahagon
    • 11. Juni 2011 um 12:31

    Ah sehr schön, das scheint zu klappen :)
    Danke

  • shell.explorer

    • Mahagon
    • 11. Juni 2011 um 11:53

    Kannst du vielleicht einmal genau beschreiben was du vor hast?
    Ich blick nicht mal, ob du den Internet oder den Windows Explorer meinst ;)

  • shell.explorer

    • Mahagon
    • 10. Juni 2011 um 22:23

    öhm das hört sich irgendwie nach Phishing an.
    Oder habe ich dich da falsch verstanden? ;)
    Was meinst du mit shell.explorer? Den Windows Explorer?

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™