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. UEZ

Beiträge von UEZ

  • Zeilenumbruch bei StringSplit

    • UEZ
    • 16. Oktober 2009 um 09:38

    Hilft dir das weiter?

    [autoit]


    #include <Array.au3>
    $text = "Dies ist " & @CRLF & "ein Test." & @CRLF & @CRLF & @LF & "Mal sehen, was passiert" & Chr(10) & @CRLF & "So, das war's."
    MsgBox(0, "Test", $text)
    $array = StringSplit(StringStripWS($text, 7), @CRLF)

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

    _ArrayDisplay($array)

    [/autoit]

    Gruß,
    UEZ

  • Effektivzinsrechner - Was mache Ich faksch ?

    • UEZ
    • 16. Oktober 2009 um 08:57

    So sollte es funzen:

    [autoit]


    #include <GUIConstants.au3>

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

    $Leihdauer = 0
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Effektivzinsrechner | Lizenz: 4lph4", 346, 262, 284, 213)
    $Label1 = GUICtrlCreateLabel("Leihbetrag", 24, 24, 117, 29)
    GUICtrlSetFont(-1, 16, 400, 0, "Verdana")
    $Label2 = GUICtrlCreateLabel("Leihdauer", 24, 64, 109, 29)
    GUICtrlSetFont(-1, 16, 400, 0, "Verdana")
    $Label3 = GUICtrlCreateLabel("Prozentsatz", 24, 104, 127, 29)
    GUICtrlSetFont(-1, 16, 400, 0, "Verdana")
    $Input1 = GUICtrlCreateInput("10000", 184, 32, 129, 21)
    $Input2 = GUICtrlCreateInput("5", 184, 64, 129, 21)
    $Input3 = GUICtrlCreateInput("7.5", 184, 104, 129, 21)
    $Button1 = GUICtrlCreateButton("Endsumme berechnen", 24, 136, 289, 33, 0)
    $Group1 = GUICtrlCreateGroup("", 8, 8, 329, 241)
    $Label4 = GUICtrlCreateLabel("Endsumme", 112, 176, 120, 29)
    GUICtrlSetFont(-1, 16, 400, 0, "Verdana")
    $Input4 = GUICtrlCreateInput("", 56, 208, 225, 21)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    ;~ GUICtrlSetData($Leihdauer,0)
    $read = GUICtrlRead($Input1)
    ;~ GUICtrlSetData($Input4,$read)
    ;~ While 2
    ;~ $readLeihdauer = GUICtrlRead($Leihdauer)
    $readInput2 = GUICtrlRead($Input2)
    $read2 = GUICtrlRead($Input4)
    $read3 = GUICtrlRead($Input3)
    $zins = $read * (1 + ($read3 / 100))^$readInput2
    GUICtrlSetData($Input4,Round($zins,2) & " €")
    ;~ $Leihdauer = $Leihdauer + 1
    ;~ If $readLeihdauer = $readInput2 Then ExitLoop
    ;~ WEnd
    ;~ GUICtrlSetData($Input1,"")
    ;~ GUICtrlSetData($Input2,"")
    ;~ GUICtrlSetData($Input3,"")
    EndSwitch
    WEnd

    [/autoit]

    Zins Formel:
    K0 = Anfangskapital
    Zn = Endkapital
    P = Prozent
    T = Jahre

    ==> Zn = K0 * (1 + (P / 100))^T

    Klasse 7 Mathematik 8)

    Gruß,
    UEZ

  • RibbonsBar (Office 2007 Bar) UDF

    • UEZ
    • 15. Oktober 2009 um 21:57

    Sieht klasse aus!

    Respekt!


    UEZ

  • Inhalt eines mehrdimensonalen arrays in eine CSV Datei ausgeben

    • UEZ
    • 14. Oktober 2009 um 10:34

    Z.B. so:

    [autoit]


    #include <Array.au3>

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

    Dim $array1[20][2]
    ;fülle Array1 mite Werten
    For $x = 0 To 19
    $array1[$x][0] = "x" & $x
    $array1[$x][1] = "y" & $x
    Next

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

    _ArrayDisplay($array1)

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

    $file = FileOpen(@ScriptDir & "\test.csv", 1)

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

    For $x = 0 To UBound($array1) - 1
    FileWriteLine($file, $x & ";" & $array1[$x][0] & ";" & $array1[$x][1])
    Next

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

    FileClose($file)

    [/autoit]

    Gruß,
    UEZ

  • CPU und Mem vom prozess

    • UEZ
    • 9. Oktober 2009 um 15:54

    Btw,

    ich hatte auch mal dbzgl. was geschrieben :D Nichts wildes!

    [ gelöst ] CPU Auslastung Auslesen

    Calc.exe öffnet sich! Einfach mal 100000! (Fakultät) berechnen! :D

    Vielleicht nützt es ja jemanden!

    Gruß,
    UEZ

    HyperThreading (HT) wird nicht unterstützt!

  • CPU und Mem vom prozess

    • UEZ
    • 9. Oktober 2009 um 15:47
    Zitat von Matthias_199

    ich vermute mal ja aber 100% kann ich nichts sagen bei meinem qaud tut er aber alle 4 anzeigen

    Was zeigt denn der Taskmanager an? Wie viele CPUs werden unter CPU Auslastung angezeigt? Wenn 4, dann hast du kein HT. Wenn 8 dann hast du HT!

    Gruß,
    UEZ

  • CPU und Mem vom prozess

    • UEZ
    • 9. Oktober 2009 um 14:59

    Kann es auch HT auslesen? Kann das momentan leider nicht testen!

    Gruß,
    UEZ

  • Skript performanter gestalten

    • UEZ
    • 7. Oktober 2009 um 12:28
    Zitat von Apocsis

    Andy: Wie gesagt, ich bin wahrscheinlich zu dämlich dazu....


    UEZ: Dein Skript läuft genauso schnell wie meine Variante..bringt mich also nicht weiter. Trotzdem Danke !


    @ALL: Da meine Funktion soweit problemlos läuft und mir die Zeit davon läuft denke ich das ich die Zeit von 8 Sek. meinem Chef verkaufen kann. Ich danke euch ALLEN für eure Mühe !!

    Ist auch eher für Remote Abfragen konzipiert! Für "nur" lokale Abfragen würde ich sehr wahrscheinlich kein WMI benutzen!

    Gruß,
    UEZ

  • String Split

    • UEZ
    • 7. Oktober 2009 um 11:07
    [autoit]


    #include <Array.au3>
    $string = "ABCDEF"
    $arrString = StringSplit($string, "")
    _ArrayDisplay($arrString)

    [/autoit]

    Gruß,
    UEZ

  • Skript performanter gestalten

    • UEZ
    • 7. Oktober 2009 um 10:26

    Hilft dir das vielleicht weiter?

    Spoiler anzeigen
    [autoit]


    ;Coded by UEZ 2009
    #AutoIt3Wrapper_Change2CUI=y
    #AutoIt3Wrapper_UseUpx=n
    #AutoIt3Wrapper_UseX64=n
    #include <array.au3>
    Global $server = "localhost"
    If $CmdLine[0] > 0 Then $server = $CmdLine[1]

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

    $objWMIService = ObjGet("winmgmts:{impersonationLevel = impersonate}!\\" & $server & "\root\cimv2")

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

    Network($server)

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

    Func Network($srv)
    Local $function_name = "Network"
    Local $filename_nw = $function_name & "_" & $srv
    Local $filename_error_current = $function_name & "_" & $srv & "_error.log"
    Local $col2Items, $Network, $j, $tmp, $TimeStamp
    Local $Net_Description, $Net_Adapter, $Net_IP, $Net_Subnet, $Net_GW, $Net_MAC, $Net_DNSSearchOrder, $Net_DNSDomainSuffixSearchOrder, $Net_Wins1, $Net_Wins2, $Net_DHCP_Server
    $Network = ""
    $colItems = $objWMIService.ExecQuery("SELECT DHCPServer, Description, WINSPrimaryServer, WINSSecondaryServer, MACAddress, DefaultIPGateway, IPAddress, IPSubnet, DNSServerSearchOrder, DNSDomainSuffixSearchOrder FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True", "WQL", 0x30)
    $col2Items = $objWMIService.ExecQuery("SELECT MACAddress, NetConnectionID FROM Win32_NetworkAdapter")

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

    If IsObj($colItems) Then
    $Network = ""
    For $objItem In $colItems
    $Net_Adapter = ""
    $Net_Description = ""
    $Net_DHCP_Server = ""
    $Net_DNSSearchOrder = ""
    $Net_DNSDomainSuffixSearchOrder = ""
    $Net_GW = ""
    $Net_IP = ""
    $Net_MAC = ""
    $Net_Subnet = ""
    $Net_Wins1 = ""
    $Net_Wins2 = ""

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

    $Net_Description = $objItem.Description

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

    If IsObj($col2Items) Then
    For $obj2Item In $col2Items
    If $objItem.MACAddress = $obj2Item.MACAddress And $obj2Item.NetConnectionID <> "" Then
    $Net_Adapter = $obj2Item.NetConnectionID
    EndIf
    Next
    ;If $Net_Adapter = "" Then $Net_Adapter = $Net_Description
    EndIf

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

    $Net_Wins1 = $objItem.WINSPrimaryServer
    $Net_Wins2 = $objItem.WINSSecondaryServer
    $Net_MAC = $objItem.MACAddress

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

    For $x = 0 To UBound($objItem.IPAddress) - 1
    $Net_IP &= $objItem.IPAddress($x) & ", "
    Next
    $Net_IP = Remove_Last_Comma($Net_IP)

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

    For $x = 0 To UBound($objItem.IPSubnet) - 1
    $Net_Subnet &= $objItem.IPSubnet($x) & ", "
    Next
    $Net_Subnet = Remove_Last_Comma($Net_Subnet)

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

    For $x = 0 To UBound($objItem.DefaultIPGateway) - 1
    $Net_GW &= $objItem.DefaultIPGateway($x) & ", "
    Next
    $Net_GW = Remove_Last_Comma($Net_GW)

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

    For $x = 0 To UBound($objItem.DNSServerSearchOrder) - 1
    $Net_DNSSearchOrder &= $objItem.DNSServerSearchOrder($x) & ", "
    Next
    $Net_DNSSearchOrder = Remove_Last_Comma($Net_DNSSearchOrder)

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

    For $x = 0 To UBound($objItem.DNSDomainSuffixSearchOrder) - 1
    $Net_DNSDomainSuffixSearchOrder &= $objItem.DNSDomainSuffixSearchOrder($x) & ", "
    Next
    $Net_DNSDomainSuffixSearchOrder = Remove_Last_Comma($Net_DNSDomainSuffixSearchOrder)

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

    If $objItem.DHCPServer <> "255.255.255.255" Then $Net_DHCP_Server = $objItem.DHCPServer

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

    $Network &= $srv & ";" & $Net_Adapter & ";" & $Net_Description & ";" & $Net_IP & ";" & $Net_Subnet & ";" & $Net_GW & ";" & $Net_MAC & ";" & $Net_DNSSearchOrder & ";" & $Net_DNSDomainSuffixSearchOrder & ";" & $Net_Wins1 & ";" & $Net_Wins2 & ";" & $Net_DHCP_Server & @CRLF
    Next
    EndIf
    ConsoleWrite($Network & @CRLF)
    EndFunc ;==>Software

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

    Func Remove_Last_Comma($str)
    If StringRight($str, 2) = ", " Then $str = StringMid($str, 1, StringLen($str) - 2)
    If StringRight($str, 1) = "," Then $str = StringMid($str, 1, StringLen($str) - 1)
    Return $str
    EndFunc ;==>Remove_Last_Comma

    [/autoit]

    Du kannst ja hier noch Inputfelder hinzufügen!

    Gruß.
    UEZ

    PS: ist aus SIC2 ;)

    Dateien

    Get Network Information.au3 3,57 kB – 357 Downloads
  • Remote Info vom Rechner und angemeldeten Benutzer

    • UEZ
    • 6. Oktober 2009 um 15:39

    Die Netzwerk Informationen bleiben bei mir leer!

    Du musst das Array (z.B. $wmiObj.IPAddress) vollständig auslesen (bei mehrere Netzwerkadapter)

    z.B.:

    [autoit]


    For $x = 0 To UBound($wmiObj.IPAddress) - 1
    $IP &= $wmiObj.IPAddress($x) & ", "
    Next

    [/autoit]

    Ferner benutze ich noch dies, um nur die IP's zu bekommen, die auch aktiv sind:

    [autoit]


    $wmiColl= $wmiRoot.ExecQuery("SELECT DHCPServer, Description, WINSPrimaryServer, WINSSecondaryServer, MACAddress, DefaultIPGateway, IPAddress, IPSubnet, DNSServerSearchOrder, DNSDomainSuffixSearchOrder FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True", "WQL", 0x30)

    [/autoit]

    Habe u.a. auch die Infos in SIC2 ausgelesen. Kannst ja mal dort unter Func Network($srv) nachschauen.

    Gruß,
    UEZ

  • arrays 'verschmelzen'

    • UEZ
    • 6. Oktober 2009 um 15:16

    Hier eine von vielen Möglichkeiten:

    [autoit]


    #include <Array.au3>

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

    Dim $array1[20][2]
    Dim $array2[20]
    Dim $array3[20][3]

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

    ;fülle Array1 & Array2
    For $x = 0 To 19
    $array1[$x][0] = "x" & $x
    $array1[$x][1] = "y" & $x
    Next
    For $x = 0 To 19
    $array2[$x] = "z" & $x
    Next

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

    ;Kopiere Array1 und Array2 nach Array3
    For $x = 0 To 19
    $array3[$x][0] = $array1[$x][0]
    $array3[$x][1] = $array1[$x][1]
    $array3[$x][2] = $array2[$x]
    Next

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

    _ArrayDisplay($array3)

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

    UEZ

  • Taschenrechner

    • UEZ
    • 6. Oktober 2009 um 13:27
    Zitat von peethebee

    UEZ, enttäusch mich nicht :D.

    0 : x ist natürlich 0 :D.


    Johannes

    Natürlich hast du recht...

    Manchmal bin ich geistig nicht da... :whistling: (voll blamiert Alter! :cursing: )

    UEZ

  • Taschenrechner

    • UEZ
    • 6. Oktober 2009 um 09:42

    Interessant wären noch andere Standard Befehle, wie Sin, Cos, Tan, Wurzel, x^n, log, ln, n!, ...

    Wenn es denn nicht den Rahmen sprengt ;)


    0/1 = 0 (hhhmmm, das stimmt wohl nicht!)

    1/0 = 1.#INF (das geht auch nicht)


    Gruß.
    UEZ

  • Alle Unterschlüssel eines Registry Pfades herausbekommen

    • UEZ
    • 6. Oktober 2009 um 00:46

    Hier ein Code Ausschnitt von SIC2, um die installierte Software (für alle Benutzer) von System per Registry auszulesen (in der unbeliebten Commandline Version :D ), ohne "Updates anzeigen"!

    Spoiler anzeigen
    [autoit]


    ;Coded by UEZ 2009
    #AutoIt3Wrapper_Change2CUI=y
    #AutoIt3Wrapper_UseUpx=n
    #AutoIt3Wrapper_UseX64=n
    #include <array.au3>
    Global $server = "localhost"
    If $CmdLine[0] > 0 Then $server = $CmdLine[1]

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

    $objWMIService = ObjGet("winmgmts:{impersonationLevel = impersonate}!\\" & $server & "\root\cimv2")

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

    ConsoleWrite(@CRLF & "Installed software on " & $server & @CRLF & @CRLF)
    Software($server)

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

    Func Software($srv) ; registry read version 2
    Local $function_name = "Software"
    Local $objReg, $HKLM, $BaseKey, $BaseKey64, $server, $arrSubKeys, $SubKey, $Value, $objRegService, $chk_nr, $chk_url, $chk_sc
    Local $software, $Key, $key_value, $SW_DisplayName, $SW_DisplayVersion, $SW_Publisher, $SW_InstallDate, $line, $TimeStamp
    Local $filename_sw = $function_name & "_" & $srv
    Local $filename_error_current = $function_name & "_" & $srv & "_error.log"
    $HKLM = 0x80000002
    $BaseKey = "Software\Microsoft\Windows\CurrentVersion\Uninstall\"
    $BaseKey64 = "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\"
    If @OSArch = "X64" And ($srv = @ComputerName Or _
    $srv = "localhost" Or _
    $srv = @IPAddress1 Or _
    $srv = @IPAddress2 Or _
    $srv = @IPAddress3 Or _
    $srv = @IPAddress4) Then
    $i = 1
    While 1
    $key = RegEnumKey("HKEY_LOCAL_MACHINE\" & $BaseKey, $i)
    If @error <> 0 Then ExitLoop
    $key_value = RegRead("HKEY_LOCAL_MACHINE\" & $BaseKey & "\" & $key, "DisplayName")
    $chk_sc = RegRead("HKEY_LOCAL_MACHINE\" & $BaseKey & "\" & $key, "SystemComponent")
    $chk_url = RegRead("HKEY_LOCAL_MACHINE\" & $BaseKey & "\" & $key, "MoreInfoURL")
    $chk_nr = RegRead("HKEY_LOCAL_MACHINE\" & $BaseKey & "\" & $key, "NoRemove")
    If $key_value <> "" And _
    StringIsASCII($key_value) <> 0 And _
    $key_value <> "Security Update for" And _
    $key_value <> "Hotfix for" And _
    $key_value <> "Update for Office" And _
    $key_value <> "Windows 2000 Hotfix" And _
    StringInStr(StringLower($key), StringLower("InstallShield_")) = 0 And _
    StringInStr(StringLower($chk_url), StringLower("http://support.microsoft.com/kb/")) = 0 And _
    $chk_nr <> 1 And $chk_sc <> 1 Then
    $SW_DisplayName = StringStripWS($key_value, 7)
    $SW_Publisher = RegRead("HKEY_LOCAL_MACHINE\" & $BaseKey & "\" & $key, "Publisher")
    $SW_InstallDate = RegRead("HKEY_LOCAL_MACHINE\" & $BaseKey & "\" & $key, "InstallDate")
    $SW_DisplayVersion = RegRead("HKEY_LOCAL_MACHINE\" & $BaseKey & "\" & $key, "DisplayVersion")
    $software &= $srv & ";" & $SW_DisplayName & ";" & $SW_DisplayVersion & ";" & $SW_Publisher & ";" & $SW_InstallDate & ";" & @CRLF
    EndIf
    $i += 1
    WEnd

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

    $i = 1
    While 1
    $key = RegEnumKey("HKEY_LOCAL_MACHINE64\" & $BaseKey, $i)
    If @error <> 0 Then ExitLoop
    $key_value = RegRead("HKEY_LOCAL_MACHINE64\" & $BaseKey & "\" & $key, "DisplayName")
    $chk_sc = RegRead("HKEY_LOCAL_MACHINE64\" & $BaseKey & "\" & $key, "SystemComponent")
    $chk_url = RegRead("HKEY_LOCAL_MACHINE64\" & $BaseKey & "\" & $key, "MoreInfoURL")
    $chk_nr = RegRead("HKEY_LOCAL_MACHINE64\" & $BaseKey & "\" & $key, "NoRemove")
    If $key_value <> "" And _
    StringIsASCII($key_value) <> 0 And _
    $key_value <> "Security Update for" And _
    $key_value <> "Hotfix for" And _
    $key_value <> "Update for Office" And _
    $key_value <> "Windows 2000 Hotfix" And _
    StringInStr(StringLower($key), StringLower("InstallShield_")) = 0 And _
    StringInStr(StringLower($chk_url), StringLower("http://support.microsoft.com/kb/")) = 0 And _
    $chk_nr <> 1 And $chk_sc <> 1 Then
    $SW_DisplayName = StringStripWS($key_value, 7)
    $SW_Publisher = RegRead("HKEY_LOCAL_MACHINE64\" & $BaseKey & "\" & $key, "Publisher")
    $SW_InstallDate = RegRead("HKEY_LOCAL_MACHINE64\" & $BaseKey & "\" & $key, "InstallDate")
    $SW_DisplayVersion = RegRead("HKEY_LOCAL_MACHINE64\" & $BaseKey & "\" & $key, "DisplayVersion")
    $software &= $srv & ";" & $SW_DisplayName & ";" & $SW_DisplayVersion & ";" & $SW_Publisher & ";" & $SW_InstallDate & ";" & @CRLF
    EndIf
    $i += 1
    WEnd
    Else
    If StringLower(@OSVersion) <> StringLower("WIN_2000") Then
    $objWMILocator = ObjCreate("WbemScripting.SWbemLocator")
    $objRegService = $objWMILocator.ConnectServer($srv, "\root\default", "", "", "", "", 0x80)
    $objReg = $objRegService.Get("StdRegProv")
    Else
    $objReg = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\" & $srv & "\root\default:StdRegProv")
    EndIf

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

    If IsObj($objReg) Then
    $objReg.EnumKey($HKLM, $BaseKey, $arrSubKeys)
    For $SubKey In $arrSubKeys
    $SW_DisplayName = ""
    $SW_DisplayVersion = ""
    $SW_Publisher = ""
    $SW_InstallDate = ""
    $Key = $objReg.GetStringValue($HKLM, $BaseKey & $SubKey, "DisplayName", $Value)
    $objReg.GetDWORDValue($HKLM, $BaseKey & $SubKey, "NoRemove", $chk_nr)
    $objReg.GetDWORDValue($HKLM, $BaseKey & $SubKey, "SystemComponent", $chk_sc)
    $objReg.GetStringValue($HKLM, $BaseKey & $SubKey, "MoreInfoURL", $chk_url)
    If $Key <> 0 Or StringLeft($SubKey, 2) = "KB" Or StringLeft($SubKey, 1) = "Q" Then
    $Key = $objReg.GetStringValue($HKLM, $BaseKey & $SubKey, "QuietDisplayName", $Value)
    EndIf
    If $Value <> "" And StringIsASCII($Value) <> 0 _
    And $Key = 0 And StringInStr(StringLower($Value), StringLower("Security Update for")) = 0 _
    And StringInStr(StringLower($Value), StringLower("Update for Windows")) = 0 _
    And StringInStr(StringLower($Value), StringLower("Hotfix for")) = 0 _
    And StringInStr(StringLower($Value), StringLower("Update for Office")) = 0 _
    And StringInStr(StringLower($SubKey), StringLower("InstallShield_")) = 0 _
    And StringInStr(StringLower($Value), StringLower("Windows 2000 Hotfix")) = 0 _
    And StringInStr(StringLower($chk_url), StringLower("http://support.microsoft.com/kb/")) = 0 _
    And $chk_nr <> 1 _
    And $chk_sc <> 1 Then
    $SW_DisplayName = $Value

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

    $Key = $objReg.GetStringValue($HKLM, $BaseKey & $SubKey, "DisplayVersion", $Value)
    If $Value <> "" And StringIsASCII($Value) <> 0 Then
    $SW_DisplayVersion = StringStripWS($Value, 7)
    EndIf

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

    $Key = $objReg.GetStringValue($HKLM, $BaseKey & $SubKey, "Publisher", $Value)
    If $Value <> "" And StringIsASCII($Value) <> 0 Then
    $SW_Publisher = StringStripWS($Value, 7)
    EndIf

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

    $Key = $objReg.GetStringValue($HKLM, $BaseKey & $SubKey, "InstallDate", $Value)
    If $Value <> "" And StringIsASCII($Value) <> 0 Then $SW_InstallDate = $Value
    $line = $srv & ";" & $SW_DisplayName & ";" & $SW_DisplayVersion & ";" & $SW_Publisher & ";" & $SW_InstallDate & ";" & @CRLF
    $software &= $line
    EndIf
    Next

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

    Dim $arrSubKeys
    $objReg.EnumKey($HKLM, $BaseKey64, $arrSubKeys)
    If UBound($arrSubKeys) > 0 Then
    For $SubKey In $arrSubKeys
    $SW_DisplayName = ""
    $SW_DisplayVersion = ""
    $SW_Publisher = ""
    $SW_InstallDate = ""
    $Key = $objReg.GetStringValue($HKLM, $BaseKey64 & $SubKey, "DisplayName", $Value)
    $objReg.GetDWORDValue($HKLM, $BaseKey64 & $SubKey, "NoRemove", $chk_nr)
    $objReg.GetDWORDValue($HKLM, $BaseKey64 & $SubKey, "SystemComponent", $chk_sc)
    $objReg.GetStringValue($HKLM, $BaseKey64 & $SubKey, "MoreInfoURL", $chk_url)
    If $Key <> 0 Or StringLeft($SubKey, 2) = "KB" Or StringLeft($SubKey, 1) = "Q" Then
    $Key = $objReg.GetStringValue($HKLM, $BaseKey64 & $SubKey, "QuietDisplayName", $Value)
    EndIf
    If $Value <> "" And StringIsASCII($Value) <> 0 _
    And $Key = 0 And StringInStr(StringLower($Value), StringLower("Security Update for")) = 0 _
    And StringInStr(StringLower($Value), StringLower("Update for Windows")) = 0 _
    And StringInStr(StringLower($Value), StringLower("Hotfix for")) = 0 _
    And StringInStr(StringLower($Value), StringLower("Update for Office")) = 0 _
    And StringInStr(StringLower($SubKey), StringLower("InstallShield_")) = 0 _
    And StringInStr(StringLower($Value), StringLower("Windows 2000 Hotfix")) = 0 _
    And StringInStr(StringLower($chk_url), StringLower("http://support.microsoft.com/kb/")) = 0 _
    And $chk_nr <> 1 _
    And $chk_nr <> 1 Then
    $SW_DisplayName = $Value

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

    $Key = $objReg.GetStringValue($HKLM, $BaseKey64 & $SubKey, "DisplayVersion", $Value)
    If $Value <> "" And StringIsASCII($Value) <> 0 Then
    $SW_DisplayVersion = StringStripWS($Value, 7)
    EndIf

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

    $Key = $objReg.GetStringValue($HKLM, $BaseKey64 & $SubKey, "Publisher", $Value)
    If $Value <> "" And StringIsASCII($Value) <> 0 Then
    $SW_Publisher = StringStripWS($Value, 7)
    EndIf

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

    $Key = $objReg.GetStringValue($HKLM, $BaseKey64 & $SubKey, "InstallDate", $Value)
    If $Value <> "" And StringIsASCII($Value) <> 0 Then $SW_InstallDate = $Value
    $line = $srv & ";" & $SW_DisplayName & ";" & $SW_DisplayVersion & ";" & $SW_Publisher & ";" & $SW_InstallDate & ";" & @CRLF
    $software &= $line
    EndIf
    Next
    EndIf
    EndIf
    EndIf
    ConsoleWrite($software & @CRLF)
    EndFunc ;==>Software

    [/autoit]

    Für Remote Systeme muss der eigene Account berechtigt und die Ports für die WMI Abfrage müssen offen sein (keine Errorhandling in dem Beispiel)!

    Vielleicht ist es auch für jemanden nützlich!

    UEZ

    Dateien

    Installed Software.au3 9,18 kB – 310 Downloads
  • Vor dem Schließen abfrage

    • UEZ
    • 5. Oktober 2009 um 16:35

    Ich glaube, dass du das meinst oder?

    [autoit]

    $Form1 = GUICreate("Form1", 640, 480)
    GUISetState(@SW_SHOW)

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

    Do
    If GUIGetMsg() = -3 Then
    $x = MsgBox(4 + 32 + 256, "Test", "Soll das Programm geschlossen werden?")
    If $x = 6 Then ExitLoop
    EndIf
    Until Not Sleep(10)

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

    Exit

    [/autoit]

    Gruß,
    UEZ

  • SIC2 (System Information Collector 2 - sammelt Information auch von Remote Systemen)

    • UEZ
    • 25. September 2009 um 11:17

    Es haben ja schon einige Leute SIC2 heruntergeladen.

    Ich wollte wissen, ob ihr mit dem CMD Tool zurecht gekommen seid:

    a) ist das Tool intuitiv benutzbar?
    b) ist die Syntax verständlich?
    c) gab es Probleme mit der Ausführung?
    d) wurde das Tools in einer größeren Umgebung mit Multiprozessing eingesetzt? Wie war die Geschwindigkeit?
    e) sonstiges

    Danke,
    UEZ

    PS: ich bin hart im Nehmen!

  • SIC2 (System Information Collector 2 - sammelt Information auch von Remote Systemen)

    • UEZ
    • 24. September 2009 um 10:23
    Zitat von kleiner27

    Guten morgen!

    Beim start ist schon schluß bei mir, Ich habe XP PRO Service3 32 Bit und bei mir kommt der fehler!

    Der Inhalt kann nicht angezeigt werden, da er nicht mehr verfügbar ist.

    woran liegt das?

    LG Kleiner

    Sorry, habe es nicht klar erwähnt: dies ist ein CMD Tool, d.h. nur in der "DOS-BOX" ausführbar!

    Also, du musst die CMD.exe starten und dort kannst du SIC2.exe aufrufen!

    Hier eine Übersicht der Befehle:

    Spoiler anzeigen


    SIC2 v2.0 build 2009-11-11 beta by UEZ.

    Usage: SIC2 <-i (system list filename)>
    [-master] for multi processing mode
    [-slaves <n>] can only be used with -master parameter.
    Default is 20.
    [-prio <0-3>] for process prio - standard is 0 (idle)
    [-silent] no output to CMD
    [-no_folder] doesn't create the output folder.
    [-zip] move Run_YYYY-MM-DD_HHMMSS folder to ZIP archive
    [-shuffle] shuffels system list
    <options> see below!
    [-ver] for version number
    [-? | /? | -help | /help]] for this page

    Options can be (at least one option below must be set):

    -all activate all options below
    -di get only information about domain
    -dp get only information about disk partitions
    -el get only information about eventlog
    -ee [d] [id] get only information about eventlog system errors-> slow
    -hd get only information about harddisk
    -hw get only information about hardware
    -ls get only information about local shares
    -lu get only information about local user accounts
    -ms get only information about membership of local administrators group
    -nw get only information about network settings
    -od get only information about optical drive
    -os get only information about operating system
    -pc get only information about patches
    -pf get only information about pagefile
    -ph get only information about PnP hardware problem
    -pt get only information about printer
    -rl get only information about role of system
    -rt get only information about persistent IP4 routing table
    -sv get only information about services
    -sw get only information about installed software
    -tz get only information about timezone
    -vc get only information about video controller

    If you set only -ee then all errors of last 7 days will be enumerated!
    Otherwise set parameter [d] for days and [id] for event id.

    If argument [-master -slaves <n>] is not given then sequential
    mode will be used automatically!

    Each slave process takes around 6 MB of memory!

    System list file for parameter -i may contain only one name or ip address
    in each line of the appropriate system.

    Output will be written to folder Output where SIC2.exe was started and to a
    separate folder named Run_YYYY-MM-DD_HHMMSS.

    Output format is a semicolon separeted text file (*.csv) in Ouput's subfolder.


    Prio parameter can be from 0-3: Idle, Below Normal, Normal and Above Normal


    Examples:

    Parallel run:
    SIC2.exe -i list.txt -all -zip -master -slaves 25
    SIC2.exe -i list.txt -os -nw -hw -master -slaves 15
    SIC2.exe -i list.txt -ee 5 7000 -di -sw -od -master -prio 1

    Sequential run:
    SIC2.exe -i list.txt -all
    SIC2.exe -i list.txt -el -pc -tz -ms -od -rt -zip
    SIC2.exe -i list.txt -ee 7 -sw -prio 2

    Eine passende GUI (nicht in SIC2.exe, sondern extern) wollte ich auch mal erstellen, nur fehlt mir momentan die Zeit. Also wer Lust hat, kann ja mal eine GUI dazu basteln!

    Gruß,
    UEZ

  • SIC2 (System Information Collector 2 - sammelt Information auch von Remote Systemen)

    • UEZ
    • 24. September 2009 um 01:14

    Hier ein Commandline (CMD) Programm (kein GDI+ ;-)), welches ich im Herbst 2008 programmiert habe, um schnell Informationen von Remote Systemen zu sammeln.

    Eine detaillierte Beschreibung von SIC2 findet ihr hier! Ich hatte mit einem Kollegen überlegt, wie man ein Script beschleunigen kann.
    Heraus kam SIC2. Ist eine, aber sicherlich nicht die beste Möglichkeit (ich habe Anfang 2008 mit AutoIt zu coden angefangen)!

    Vielleicht nützt es ja einigen System Admins, um "schnell" Informationen von seinen Systemen zu sammeln :D

    Nicht getestet auf x64 Systemen. Ein Kollege sagte mir, dass die Software Liste auf x64 nicht vollständig ausgelesen wird... Sollte jetzt funzen!

    Source Code + compilierte Exe + SIC2GUI im Dateianhang unten (Build 2012-02-24 Beta)!

    Ich habe unter WinXP, Windows 2000 und Windows2003 keine Möglichkeit herausgefunden, um die installierten CPUs auszulesen! :(

    Jetzt mit zusätzlicher GUI als extra Skript für Mausschubser ;)

    Gruß,
    UEZ

    PS: Für ein Feedback bitte mein Post#4 unten checken!

    Dateien

    SIC2.7z 1,02 MB – 507 Downloads SIC2_GUI.7z 59,92 kB – 517 Downloads
  • Mein Jump n' Run Spiel mit der Irrlich Engine - Neue Version!

    • UEZ
    • 20. September 2009 um 21:33

    Saubere Arbeit :thumbup: Einige Konstanten kommen mir bekannt vor... ;)

    Ich habe mich noch nie mit Irrlicht befasst. Sieht so aus, als ob man tolle 3D Sachen darstellen kann...

    Gruß,
    UEZ

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™