Hallo aus lange weile geschrieben kann ja vielleicht jemand in sein Scirpt einbauen
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
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#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 ###
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