PC-Informationstool (Kann vlt jemand gebrauchen)

  • Hallo aus lange weile geschrieben kann ja vielleicht jemand in sein Scirpt einbauen :D
    Wäre über ein Dank im About oder Programm dankbar...

    Funktionen:
    Auslesen

    • Computername
    • Betriebssystem
    • Service-Pack
    • IP-Adresse (Netzwerk-Intern)
    • Systemordner/Verzeichnis

    Herunterfahren
    Neustarten
    Abmelden
    Stand-By Modus
    PC-Ausschalten (Strom-Ab Modus)

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>

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

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 429, 463, 192, 124)
    $Group1 = GUICtrlCreateGroup("Group1", 8, 16, 409, 201)
    $Label1 = GUICtrlCreateLabel("ComputerName:", 24, 40, 156, 28)
    GUICtrlSetFont(-1, 14, 800, 4, "MS Sans Serif")
    $Label2 = GUICtrlCreateLabel("Betriebssystem:", 24, 72, 150, 28)
    GUICtrlSetFont(-1, 14, 800, 4, "MS Sans Serif")
    $Label4 = GUICtrlCreateLabel("Service-Pack:", 24, 104, 132, 28)
    GUICtrlSetFont(-1, 14, 800, 4, "MS Sans Serif")
    $Label3 = GUICtrlCreateLabel("IP-Adresse:", 24, 136, 112, 28)
    GUICtrlSetFont(-1, 14, 800, 4, "MS Sans Serif")
    $Label5 = GUICtrlCreateLabel("Systemordner:", 24, 168, 156, 28)
    GUICtrlSetFont(-1, 14, 800, 4, "MS Sans Serif")
    $Input1 = GUICtrlCreateInput(@ComputerName, 184, 40, 209, 28, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
    GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
    $Input2 = GUICtrlCreateInput(@OSVersion & " " & @OSBuild & " ", 184, 72, 209, 28, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
    GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
    $Input3 = GUICtrlCreateInput(@OSServicePack, 184, 104, 209, 28, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
    GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
    $Input4 = GUICtrlCreateInput(@IPAddress1, 184, 136, 209, 28, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
    GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
    $Input5 = GUICtrlCreateInput(@Windowsdir, 184, 168, 209, 28, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
    GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group2 = GUICtrlCreateGroup("Group2", 8, 224, 409, 145)
    $Button1 = GUICtrlCreateButton("Benutzer Abmelden", 16, 240, 123, 41, 0)
    $Button2 = GUICtrlCreateButton("Benutzer Wechseln", 144, 240, 131, 41, 0)
    Guictrlsetstate(-1,$GUI_DISABLE)
    $Button3 = GUICtrlCreateButton("PC Herunterfahren", 16, 288, 123, 41, 0)
    $Button4 = GUICtrlCreateButton("Stand-By Modus", 280, 240, 131, 41, 0)
    $Button5 = GUICtrlCreateButton("PC NeuStarten", 144, 288, 131, 41, 0)
    $Button6 = GUICtrlCreateButton("PC Ausschalten", 280, 288, 131, 41, 0)
    $Checkbox1 = GUICtrlCreateCheckbox("Aktion Erzwingen (Erweitert)", 16, 336, 393, 25)
    GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group3 = GUICtrlCreateGroup("Group3", 8, 368, 409, 97)
    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
    If Guictrlread($Checkbox1) = $GUI_CHECKED Then Shutdown(16) Else Shutdown (0) Endif
    Case $Button3
    If Guictrlread($Checkbox1) = $GUI_CHECKED Then Shutdown(17) Else Shutdown (1) Endif
    Case $Button4
    If Guictrlread($Checkbox1) = $GUI_CHECKED Then Shutdown(80) Else Shutdown (64) Endif
    Case $Button5
    If Guictrlread($Checkbox1) = $GUI_CHECKED Then Shutdown(18) Else Shutdown (2) Endif
    Case $Button6
    If Guictrlread($Checkbox1) = $GUI_CHECKED Then Shutdown(24) Else Shutdown (8) Endif
    EndSwitch
    WEnd

    [/autoit]
  • schau mal was ich in der Hilfe gefunden habe :

    Spoiler anzeigen
    [autoit]

    #include <GuiConstantsEx.au3>
    #include <WindowsConstants.au3>

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

    Opt('MustDeclareVars', 1)

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

    _Main()

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

    Func _Main()
    Local $VOL, $SERIAL, $TOTAL, $FREE
    Local $Input_ComputerName, $Input_CurrentUserName, $Input_OperatingSystem
    Local $Input_ServicePack, $Input_VolumeLabel, $Input_SerialNumber
    Local $Input_TotalSpace, $Input_FreeSpace, $Input_IpAddress, $Input_StartupDirectory
    Local $Input_WindowsDirectory, $Input_SystemFolderDirectory, $Input_DesktopDirectory
    Local $Input_MyDocumentsDirectory, $Input_ProgramFilesDirectory, $Input_StartMenuDirectory
    Local $Input_TemporaryFileDirectory, $Input_DesktopWidth, $Input_DesktopHeight
    Local $Input_Date, $Input_Time, $msg

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

    #forceref $Input_ComputerName, $Input_CurrentUserName, $Input_OperatingSystem
    #forceref $Input_ServicePack, $Input_VolumeLabel, $Input_SerialNumber
    #forceref $Input_TotalSpace, $Input_FreeSpace, $Input_IpAddress, $Input_StartupDirectory
    #forceref $Input_WindowsDirectory, $Input_SystemFolderDirectory, $Input_DesktopDirectory
    #forceref $Input_MyDocumentsDirectory, $Input_ProgramFilesDirectory, $Input_StartMenuDirectory
    #forceref $Input_TemporaryFileDirectory, $Input_DesktopWidth, $Input_DesktopHeight
    #forceref $Input_Date, $Input_Time

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

    GUICreate("Computer Information - By : Para", 469, 639, (@DesktopWidth - 469) / 2, (@DesktopHeight - 639) / 2, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

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

    $VOL = DriveGetLabel("C:\")
    $SERIAL = DriveGetSerial("C:\")
    $TOTAL = DriveSpaceTotal("C:\")
    $FREE = DriveSpaceFree("C:\")

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

    GUICtrlCreateLabel("Computer Name", 10, 10, 150, 20)
    GUICtrlCreateLabel("Current User Name", 10, 40, 150, 20)
    GUICtrlCreateLabel("Operating System", 10, 70, 150, 20)
    GUICtrlCreateLabel("Service Pack", 10, 100, 150, 20)
    GUICtrlCreateLabel("C: Volume Label", 10, 130, 150, 20)
    GUICtrlCreateLabel("C: Serial Number", 10, 160, 150, 20)
    GUICtrlCreateLabel("C: Total Space", 10, 190, 150, 20)
    GUICtrlCreateLabel("C: Free Space", 10, 220, 150, 20)
    GUICtrlCreateLabel("Ip Address", 10, 250, 150, 20)
    GUICtrlCreateLabel("Startup Directory", 10, 280, 150, 20)
    GUICtrlCreateLabel("Windows Directory", 10, 310, 150, 20)
    GUICtrlCreateLabel("System Folder Directory", 10, 340, 150, 20)
    GUICtrlCreateLabel("Desktop Directory", 10, 370, 150, 20)
    GUICtrlCreateLabel("My Documents Directory", 10, 400, 150, 20)
    GUICtrlCreateLabel("Program File Directory", 10, 430, 150, 20)
    GUICtrlCreateLabel("Start Menu Directory", 10, 460, 150, 20)
    GUICtrlCreateLabel("Desktop Width (Pixels)", 10, 520, 150, 20)
    GUICtrlCreateLabel("Temporary File Directory", 10, 490, 150, 20)
    GUICtrlCreateLabel("Desktop Height (Pixels)", 10, 550, 150, 20)
    GUICtrlCreateLabel("Date", 10, 580, 150, 20)
    GUICtrlCreateLabel("Time", 10, 610, 150, 20)
    $Input_ComputerName = GUICtrlCreateInput("" & @ComputerName, 180, 10, 280, 20)
    $Input_CurrentUserName = GUICtrlCreateInput("" & @UserName, 180, 40, 280, 20)
    $Input_OperatingSystem = GUICtrlCreateInput("" & @OSTYPE, 180, 70, 280, 20)
    $Input_ServicePack = GUICtrlCreateInput("" & @OSServicePack, 180, 100, 280, 20)
    $Input_VolumeLabel = GUICtrlCreateInput("" & $VOL, 180, 130, 280, 20)
    $Input_SerialNumber = GUICtrlCreateInput("" & $SERIAL, 180, 160, 280, 20)
    $Input_TotalSpace = GUICtrlCreateInput("" & $TOTAL, 180, 190, 280, 20)
    $Input_FreeSpace = GUICtrlCreateInput("" & $FREE, 180, 220, 280, 20)
    $Input_IpAddress = GUICtrlCreateInput("" & @IPAddress1, 180, 250, 280, 20)
    $Input_StartupDirectory = GUICtrlCreateInput("" & @StartupDir, 180, 280, 280, 20)
    $Input_WindowsDirectory = GUICtrlCreateInput("" & @WindowsDir, 180, 310, 280, 20)
    $Input_SystemFolderDirectory = GUICtrlCreateInput("" & @SystemDir, 180, 340, 280, 20)
    $Input_DesktopDirectory = GUICtrlCreateInput("" & @DesktopDir, 180, 370, 280, 20)
    $Input_MyDocumentsDirectory = GUICtrlCreateInput("" & @MyDocumentsDir, 180, 400, 280, 20)
    $Input_ProgramFilesDirectory = GUICtrlCreateInput("" & @ProgramFilesDir, 180, 430, 280, 20)
    $Input_StartMenuDirectory = GUICtrlCreateInput("" & @StartMenuDir, 180, 460, 280, 20)
    $Input_TemporaryFileDirectory = GUICtrlCreateInput("" & @TempDir, 180, 490, 280, 20)
    $Input_DesktopWidth = GUICtrlCreateInput("" & @DesktopWidth, 180, 520, 280, 20)
    $Input_DesktopHeight = GUICtrlCreateInput("" & @DesktopHeight, 180, 550, 280, 20)
    $Input_Date = GUICtrlCreateInput("(MONTH)(DAY)(YEAR) " & @MON & "-" & @MDAY & "-" & @YEAR, 180, 580, 280, 20)
    $Input_Time = GUICtrlCreateInput("(HOUR)(MIN)(SEC) " & @HOUR & ":" & @MIN & ":" & @SEC, 180, 610, 280, 20)

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

    GUISetState()
    While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
    ExitLoop
    Case Else
    ;;;
    EndSelect
    WEnd
    Exit
    EndFunc ;==>_Main

    [/autoit]


    Ist etwas umfrangreicher vom Auslesen :)
    Aber sonst ist deins eig auch ganz nett :P