Private Process-Controll V1.0

  • Hallo, bestes Forum !!!

    Ich möchte euch mal mein neustes Script Vorstellen.
    [ -> Private Process-Controll V1.0 <-]

    Ich benötige einige Processe (Dienste) nicht immer und wollte sie bei bedarf abschalten und wieder einschalten können.
    Ich weiß das es auch viel einfacher geht, aber ich wollte auch eine GUI dazu haben.

    Probiert es einfach aus.
    Ich könnt mein Script auch so verändern wie Ihr wollt. :D

    Wenn es auch auf Vista und Win7 läuft dann, haben ich einige Werte sehr gut geschätzt :D
    Habe es nur auf XP getestet und Programmiert...

    So nun zu meinem Script

    Spoiler anzeigen
    [autoit]


    #NoTrayIcon
    #RequireAdmin
    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_icon=C:\Programme\AutoIt3\Aut2Exe\Icons\AutoIt_Old4.ico
    #AutoIt3Wrapper_outfile=Private Process-Controll V1.0.exe
    #AutoIt3Wrapper_Compression=3
    #AutoIt3Wrapper_UPX_Parameters=--ultra-brute
    #AutoIt3Wrapper_Res_Description=Controll private Processes
    #AutoIt3Wrapper_Res_Fileversion=1.0.0.0
    #AutoIt3Wrapper_Res_LegalCopyright=TV_Freeze (http://www.autoit.de)
    #AutoIt3Wrapper_Res_Field=Coded by|TV_Freeze
    #AutoIt3Wrapper_Res_Field=Build|02-10-2011 Final Version
    #AutoIt3Wrapper_Res_Field=Compile date|%longdate% %time%
    #AutoIt3Wrapper_Res_Field=AutoIt Version|%AutoItVer%
    #AutoIt3Wrapper_Run_After=del /f /q "%scriptdir%\%scriptfile%_Obfuscated.au3"
    #AutoIt3Wrapper_Run_Obfuscator=y
    #Obfuscator_Parameters=/sf /sv /om /cs=0 /cn=0
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    ;~ #Obfuscator_Parameters=/sf /sv /om /cs=0 /cn=0 /cf=0 /cv=0
    #include <GUIConstantsEx.au3>
    #include <GuiListView.au3>
    #include <GuiStatusBar.au3>
    #include <ListViewConstants.au3>
    #include <Misc.au3>
    #include <StatusBarConstants.au3>
    If Not IsAdmin() Then ; keine Administratorrechte ?
    Exit
    EndIf
    ;
    ; Private Process-Controll V1.0
    ; Coded by TV_Freeze (Autoit.de)
    ; 10.02.2011
    ; with Autoit Version 3.3.6.1
    ;
    ; Function:
    ; Terminate only my private Services
    ; or start it...
    ;
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <GuiStatusBar.au3>
    #include <GuiListView.au3>
    #include <GuiStatusBar.au3>
    #include <Misc.au3>

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

    Opt('GUIOnEventMode', 0)
    Opt('MustDeclareVars', 1) ; 0=nein, 1=erfordert Deklaration
    Opt("GUICloseOnESC", 0) ; 1=ESC beendet, 0=ESC schließt nicht

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

    $Debug_LV = False ; Check ClassName being passed to ListView functions, set to True and use a handle to another control to see it work

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

    Global $title = 'Private Process-Controll V1.0'
    Global $nr, $Active_Text = 'Active Services '
    Global $a, $aItem, $begin, $tf, $wahl, $mwin, $gh, $lh, $bh, $PID, $pc, $vers, $mainwin, $msg, $msg2, $hListView, $hHeader, $Button_1, $Button_2, $Button_3, $Button_4, $Button_5, $process[20]
    Global $exStyles = BitOR($LVS_LIST, $LVS_EX_CHECKBOXES, $LVS_SORTASCENDING)
    Global $aParts[2] = [45, -1], $hStatus, $text, $timer = 2, $newtime, $size, $aGUI, $ja, $Ja_Button, $Nein_Button, $Zeit_Button, $warte
    If _Singleton($title, 1) = 0 Then Exit MsgBox(16, "STOP !", 'The program is already running!', 5)

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

    ; My private services !
    $process[0] = "alg.exe"
    $process[1] = "schedul2.exe"
    $process[2] = "avguard.exe"
    $process[3] = "cygrunsrv.exe"
    $process[4] = "FABS.exe"
    $process[5] = "spoolsv.exe"
    $process[6] = "PDSched.exe"
    $process[7] = "TuneUpUtilitiesService32.exe"
    $process[8] = "VMLiteService.exe"
    $process[9] = "vmnat.exe"
    $process[10] = "vmnetdhcp.exe"
    $process[11] = "vmware-authd.exe"
    $process[12] = "vmware-ufad.exe"
    $process[13] = "vmware-usbarbitrator.exe"

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

    $vers = @OSVersion
    If $vers = "WIN_XP" Then $vers = "Windows XP"
    If $vers = "WIN_2000" Then $vers = "Windows 2000"
    If $vers = "WIN_2003" Then $vers = "Windows Server 2003"
    If $vers = "WIN_2008" Then $vers = "Windows Server 2008"
    If $vers = "WIN_2008R2" Then $vers = "Windows Server 2008 R2"
    If $vers = "WIN_XPe" Then $vers = "Windows XPe"
    If $vers = "WIN_VISTA" Then $vers = "Windows Vista"
    If $vers = "WIN_7" Then $vers = "Windows 7"

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

    If $vers = "Windows 7" Or $vers = "Windows Vista" Then
    $mwin = 425 ; GUI
    $bh = 362 ; Buttons
    $lh = 295 ; ListView
    $gh = 313 ; Group
    Else ; Werte für andere Versionen
    $mwin = 385
    $bh = 326
    $lh = 259
    $gh = 277
    EndIf
    $mainwin = GUICreate($title, 400, $mwin, -1, -1, -1)
    GUICtrlCreateGroup("", 3, 5, 393, 38)
    GUICtrlCreateLabel("Coded with Autoit V3.3.6.1 by [email='TV_Freeze@AutoIt.de'][/email] !", 15, 20)
    GUICtrlCreateGroup("", 3, 44, 393, $gh)
    GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group

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

    $Button_1 = GUICtrlCreateButton("Turn on", 5, $bh, 68, 30)
    GUICtrlSetTip(-1, 'All selected services are turned on') ; Tooltip aktivieren
    $Button_2 = GUICtrlCreateButton("Turn off", 83, $bh, 68, 30)
    GUICtrlSetTip(-1, 'All selected services are turned off') ; Tooltip aktivieren
    $Button_3 = GUICtrlCreateButton("All/None Select", 161, $bh, 124, 30)
    GUICtrlSetTip(-1, 'All services select / deselect') ; Tooltip aktivieren
    $Button_4 = GUICtrlCreateButton("Check", 294, $bh, 46, 30)
    GUICtrlSetTip(-1, 'Only active services will be selected') ; Tooltip aktivieren
    $Button_5 = GUICtrlCreateButton("Exit", 348, $bh, 44, 30)
    GUICtrlSetTip(-1, 'Program Exit') ; Tooltip aktivieren

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

    $hListView = GUICtrlCreateListView("", 8, 56, 382, $lh)

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

    _GUICtrlListView_SetExtendedListViewStyle($hListView, $exStyles)
    $hHeader = HWnd(_GUICtrlListView_GetHeader($hListView))
    ControlDisable($hHeader, "", "") ; ListView - Spaltenbreite sperren

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

    _GUICtrlListView_AddColumn($hListView, "Services from " & $vers, 328)
    _GUICtrlListView_AddColumn($hListView, "Active", 50)

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

    _GUICtrlListView_AddItem($hListView, "Gateway Service", 0)
    _GUICtrlListView_AddItem($hListView, "Acronis Scheduler2 Service", 0)
    _GUICtrlListView_AddItem($hListView, "Avira AntiVir Guard - Antivirus On-Access Service", 0)
    _GUICtrlListView_AddItem($hListView, "OpenSSH Server", 0)
    _GUICtrlListView_AddItem($hListView, "FABS - Helping agent for MAGIX media database", 0)
    _GUICtrlListView_AddItem($hListView, "Print queue (Spooler)", 0)
    _GUICtrlListView_AddItem($hListView, "Raxco - PerfectDisk (PDScheduler)", 0)
    _GUICtrlListView_AddItem($hListView, "TuneUp Utilities Service (2010)", 0)
    _GUICtrlListView_AddItem($hListView, "VMLite Host Service", 0)
    _GUICtrlListView_AddItem($hListView, "VMware NAT Service", 0)
    _GUICtrlListView_AddItem($hListView, "VMware DHCP Service", 0)
    _GUICtrlListView_AddItem($hListView, "VMware Authorization Service", 0)
    _GUICtrlListView_AddItem($hListView, "VMware Agent Service", 0)
    _GUICtrlListView_AddItem($hListView, "VMware USB Arbitration Service", 0)

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

    ; System-Processe prüfen (aus meiner Liste)

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

    $nr = 0 ; Process-Zähler

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

    For $i = 0 To 13 ; Anzahl der Processe
    $PID = ProcessExists($process[$i])
    If $PID = 0 Then
    _GUICtrlListView_AddSubItem($hListView, $i, "No", 1)
    Else
    $nr = $nr + 1
    _GUICtrlListView_AddSubItem($hListView, $i, "Yes", 1)
    _GUICtrlListView_SetItemChecked($hListView, $i)
    EndIf
    Next

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

    ; Statusbar
    $hStatus = _GUICtrlStatusBar_Create($mainwin, -1, "", $SBARS_TOOLTIPS)
    _GUICtrlStatusBar_SetParts($hStatus, $aParts)
    _GUICtrlStatusBar_SetText($hStatus, "Status", 0)
    _GUICtrlStatusBar_SetText($hStatus, "", 1)

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

    ; Aktive Processe anzeigen
    Show_Active_Processes()

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

    GUISetState(@SW_SHOW)

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

    ;Hauptschleife
    While 1
    $text = _GUICtrlStatusBar_GetText($hStatus, 1)
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_MINIMIZE And $text = ""
    set_timer()
    Case $msg = $GUI_EVENT_RESTORE And $text = ""
    GUISetState(@SW_SHOW, $mainwin) ; zeige Hauptfenster wieder an
    Case $msg = $GUI_EVENT_CLOSE Or $msg = $Button_5
    ExitLoop
    Case $msg = $Button_4
    GUICtrlSetTip($Button_4, '') ; Tooltip aus
    pruefen()
    Case $msg = $Button_3
    GUICtrlSetTip($Button_3, '') ; Tooltip aus
    allnone()
    Case $msg = $Button_2
    GUICtrlSetTip($Button_2, '') ; Tooltip aus
    Process_off()
    Case $msg = $Button_1
    GUICtrlSetTip($Button_1, '') ; Tooltip aus
    Process_on()
    EndSelect
    WEnd
    GUIDelete($mainwin)
    Exit

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

    ; Processe prüfen und Checkbox an/aus markieren
    Func pruefen()
    $nr = 0
    For $i = 0 To 13 ; Anzahl der Processe
    $PID = ProcessExists($process[$i])
    If $PID = 0 Then
    _GUICtrlListView_AddSubItem($hListView, $i, "No", 1)
    _GUICtrlListView_SetItemChecked($hListView, $i, False)
    Else
    $nr = $nr + 1
    _GUICtrlListView_AddSubItem($hListView, $i, "Yes", 1)
    _GUICtrlListView_SetItemChecked($hListView, $i, True)
    EndIf
    Next
    Show_Active_Processes()
    $wahl = 0
    GUICtrlSetTip($Button_4, 'Only active services will be selected') ; Tooltip an
    EndFunc ;==>pruefen

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

    ; Funktion alles/nichts auswählen
    Func allnone()
    Select
    Case $wahl = 0
    For $i = 0 To 13 ; Anzahl der Processe
    If _GUICtrlListView_GetItemChecked($hListView, $i) = False Then
    _GUICtrlListView_SetItemChecked($hListView, $i, True)
    EndIf
    Next
    $wahl = 1

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

    Case $wahl = 1
    For $i = 0 To 13 ; Anzahl der Processe
    If _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    _GUICtrlListView_SetItemChecked($hListView, $i, False)
    EndIf
    Next
    $wahl = 0
    EndSelect
    GUICtrlSetTip($Button_3, 'All services select / deselect') ; Tooltip an
    EndFunc ;==>allnone

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

    Func set_timer()
    Opt('GUIOnEventMode', 1) ; EventModus an
    $aGUI=GUICreate('Timer Setting ?', 245, 100, (@DesktopWidth/2)-132, (@DesktopHeight/2)-65, $WS_BORDER, BitOR($WS_EX_CLIENTEDGE, $WS_EX_TOPMOST))
    GUICtrlCreateLabel('Do you want to set the timer for the statusline ?', 5, 5, 300, 36, 0)

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

    $Ja_Button = GUICtrlCreateButton('Yes', 45, 40, 65, 25)
    GUICtrlSetOnEvent(-1, "Yes")

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

    $Nein_Button = GUICtrlCreateButton('No', 145, 40, 65, 25)
    GUICtrlSetOnEvent(-1, "No")

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

    $Zeit_Button = GUICtrlCreateButton('', 115, 40, 26, 25)
    GUICtrlSetState(-1, $GUI_DISABLE)

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

    GUISetState(@SW_SHOW, $aGUI)

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

    $warte = TimerInit()
    While TimerDiff($warte) < 4 * 1000 ; 4 Sekunden überschritten ?
    Sleep(100)
    GUICtrlSetData($Zeit_Button, 4 - Int(TimerDiff($warte) / 1000))
    WEnd

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

    GUIDelete($aGUI)
    Opt('GUIOnEventMode', 0) ; EventModus aus

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

    If $ja = True Then
    GUISetState(@SW_SHOW, $mainwin) ; zeige Hauptfenster wieder an
    $size = WinGetPos($title)
    $i = $timer ; merke den Wert für eine Fehler-Eingabe
    Do
    $timer = $i
    $newtime = InputBox("Timer Setting","Please enter only one number" & @CR & "(0-4) Seconds", $timer, ' M1', 1, 127, $size[0]+115, $size[1]+140, $mainwin)
    If $newtime = '' Then
    ExitLoop ; Cancel, verändere nichts...
    ElseIf Number($newtime) Then
    If $newtime > -1 And $newtime < 5 Then
    $timer = $newtime
    Else
    $timer = -1 ;Fehler-Eingabe
    EndIf
    ElseIf $newtime = '0' Then
    $timer = $newtime
    Else
    $timer = -1 ;Fehler-Eingabe
    EndIf
    Until $timer > -1 And $timer < 5
    $ja = False
    EndIf
    EndFunc ;==>set_timer

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

    Func Yes()
    GUIDelete($aGUI)
    GUISetState(@SW_RESTORE) ; zeige Hauptfenster wieder
    $warte = 5 * 1000 ; Zeit überschritten ! raus aus While/WEnd
    $ja = True
    EndFunc ;==>OK

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

    Func No()
    GUIDelete($aGUI)
    $warte = 5 * 1000 ; ; Zeit überschritten ! raus aus While/WEnd
    $ja = False
    EndFunc ;==>NEIN

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

    ; Alle markierten Processe ausschalten
    Func Process_off()
    For $i = 0 To 13 ; Anzahl der Processe
    $PID = ProcessExists($process[$i])
    If $PID <> 0 Then
    $aItem = _GUICtrlListView_GetItem($hListView, $i)
    If $aItem[3] = "Gateway Service" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    $PID = ProcessExists($process[$i])
    If $PID Then
    Run(@ComSpec & " /c " & 'sc stop "ALG"', "", @SW_HIDE)
    _GUICtrlStatusBar_SetText($hStatus, "Terminate - " & $aItem[3], 1)
    delay()
    set_no($i)
    EndIf
    EndIf

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

    If $aItem[3] = "Acronis Scheduler2 Service" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    RunWait(@ComSpec & " /c " & 'sc stop AcrSch2Svc', "", @SW_HIDE)
    $PID = ProcessExists("TrueImageMonitor.exe")
    If $PID Then ProcessClose($PID)
    _GUICtrlStatusBar_SetText($hStatus, "Terminate - " & $aItem[3], 1)
    delay()
    set_no($i)
    EndIf

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

    If $aItem[3] = "Avira AntiVir Guard - Antivirus On-Access Service" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    RunWait(@ComSpec & " /c " & 'sc stop AntiVirSchedulerService', "", @SW_HIDE)
    RunWait(@ComSpec & " /c " & 'sc stop AntiVirService', "", @SW_HIDE)
    ; Terminate Process fehlgeschlagen ?
    If ProcessExists("avgnt.exe") Then
    For $pc = 1 to 5 ; Versuche 5 mal 'avgnt.exe' zu beenden
    Sleep(50)
    $PID = ProcessExists("avgnt.exe")
    If $PID Then ProcessClose($PID)
    Next
    If Not ProcessExists("avgnt.exe") Then ; wenn kein 'avgnt.exe'
    _GUICtrlStatusBar_SetText($hStatus, "Terminate - " & $aItem[3], 1)
    delay()
    set_no($i)
    EndIf
    EndIf
    If ProcessExists("avguard.exe") Then
    _GUICtrlStatusBar_SetText($hStatus, "Avira AntiVir Guard could not stop. (Process is protected!)", 1)
    delay()
    ElseIf Not ProcessExists("avguard.exe") Then
    ; Versuche nochmal 'avgnt.exe' zu beenden
    Sleep(50)
    $PID = ProcessExists("avgnt.exe")
    If $PID Then ProcessClose($PID)
    $nr = $nr + 1 ; Anzahl erhöhen wegen zweiter Durchlauf...
    set_no($i)
    EndIf
    EndIf

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

    If $aItem[3] = "OpenSSH Server" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    RunWait(@ComSpec & " /c " & 'sc stop OpenSSHd', "", @SW_HIDE)
    _GUICtrlStatusBar_SetText($hStatus, "Terminate - " & $aItem[3], 1)
    delay()
    set_no($i)
    $PID = ProcessExists("cygrunsrv.exe")
    If $PID Then ProcessClose($PID)
    EndIf

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

    If $aItem[3] = "FABS - Helping agent for MAGIX media database" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    RunWait(@ComSpec & " /c " & 'sc stop Fabs', "", @SW_HIDE)
    _GUICtrlStatusBar_SetText($hStatus, "Terminate - " & $aItem[3], 1)
    delay()
    set_no($i)
    EndIf

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

    If $aItem[3] = "Print queue (Spooler)" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    RunWait(@ComSpec & " /c " & 'sc stop spooler', "", @SW_HIDE)
    _GUICtrlStatusBar_SetText($hStatus, "Terminate - " & $aItem[3], 1)
    delay()
    set_no($i)
    EndIf

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

    If $aItem[3] = "Raxco - PerfectDisk (PDScheduler)" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    RunWait(@ComSpec & " /c " & 'sc stop PDSched', "", @SW_HIDE)
    _GUICtrlStatusBar_SetText($hStatus, "Terminate - " & $aItem[3], 1)
    delay()
    set_no($i)
    EndIf

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

    If $aItem[3] = "TuneUp Utilities Service (2010)" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    RunWait(@ComSpec & " /c " & 'sc stop TuneUp.UtilitiesSvc', "", @SW_HIDE)
    _GUICtrlStatusBar_SetText($hStatus, "Terminate - " & $aItem[3], 1)
    delay()
    set_no($i)
    EndIf

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

    If $aItem[3] = "VMLite Host Service" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    RunWait(@ComSpec & " /c " & 'sc stop VMLiteService', "", @SW_HIDE)
    _GUICtrlStatusBar_SetText($hStatus, "Terminate - " & $aItem[3], 1)
    delay()
    set_no($i)
    EndIf

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

    If $aItem[3] = "VMware NAT Service" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    RunWait(@ComSpec & " /c " & 'sc stop "VMware NAT Service"', "", @SW_HIDE)
    _GUICtrlStatusBar_SetText($hStatus, "Terminate - " & $aItem[3], 1)
    delay()
    set_no($i)
    EndIf

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

    If $aItem[3] = "VMware DHCP Service" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    RunWait(@ComSpec & " /c " & 'sc stop VMnetDHCP', "", @SW_HIDE)
    _GUICtrlStatusBar_SetText($hStatus, "Terminate - " & $aItem[3], 1)
    delay()
    set_no($i)
    EndIf

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

    If $aItem[3] = "VMware Authorization Service" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    RunWait(@ComSpec & " /c " & 'sc stop VMAuthdService', "", @SW_HIDE)
    _GUICtrlStatusBar_SetText($hStatus, "Terminate - " & $aItem[3], 1)
    delay()
    set_no($i)
    EndIf

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

    If $aItem[3] = "VMware Agent Service" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    RunWait(@ComSpec & " /c " & 'sc stop ufad-ws60', "", @SW_HIDE)
    _GUICtrlStatusBar_SetText($hStatus, "Terminate - " & $aItem[3], 1)
    delay()
    set_no($i)
    EndIf

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

    If $aItem[3] = "VMware USB Arbitration Service" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    RunWait(@ComSpec & " /c " & 'sc stop VMUSBArbService', "", @SW_HIDE)
    _GUICtrlStatusBar_SetText($hStatus, "Terminate - " & $aItem[3], 1)
    delay()
    set_no($i)
    EndIf

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

    Else
    $PID = ProcessExists($process[$i])
    If $PID = 0 Then
    $nr = $nr + 1
    set_no($i)
    EndIf
    EndIf

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

    Next
    $wahl = 0
    GUICtrlSetTip($Button_2, 'All selected services are turned off') ; Tooltip aktivieren
    EndFunc ;==>Process_off

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

    ; Alle markierten Processe einschalten
    Func Process_on()
    For $i = 0 To 13 ; Anzahl der Processe
    $PID = ProcessExists($process[$i])
    If $PID = 0 Then
    $aItem = _GUICtrlListView_GetItem($hListView, $i)
    If $aItem[3] = "Gateway Service" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    RunWait(@ComSpec & " /c " & 'sc start ALG', "", @SW_HIDE)
    $PID = ProcessExists($process[$i])
    If $PID <> 0 Then
    _GUICtrlStatusBar_SetText($hStatus, "Start - " & $aItem[3], 1)
    delay()
    set_yes($i)
    Else
    $nr = $nr + 1
    set_no($i)
    EndIf
    EndIf

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

    If $aItem[3] = "Acronis Scheduler2 Service" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    Run("C:\Programme\Acronis\TrueImageHome\TrueImageMonitor.exe")
    If @error Then
    $nr = $nr + 1
    set_no($i)
    Else
    RunWait(@ComSpec & " /c " & 'sc start AcrSch2Svc', "", @SW_HIDE)
    $PID = ProcessExists($process[$i])
    If $PID <> 0 Then
    _GUICtrlStatusBar_SetText($hStatus, "Start - " & $aItem[3], 1)
    delay()
    set_yes($i)
    EndIf
    EndIf
    EndIf

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

    If $aItem[3] = "Avira AntiVir Guard - Antivirus On-Access Service" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    Run("C:\Programme\Avira\AntiVir Desktop\avgnt.exe")
    If @error Then
    $nr = $nr + 1
    set_no($i)
    Else
    RunWait(@ComSpec & " /c " & 'sc start AntiVirSchedulerService', "", @SW_HIDE)
    RunWait(@ComSpec & " /c " & 'sc start AntiVirService', "", @SW_HIDE)
    $PID = ProcessExists($process[$i])
    If $PID <> 0 Then
    _GUICtrlStatusBar_SetText($hStatus, "Start - " & $aItem[3], 1)
    delay()
    set_yes($i)
    EndIf
    EndIf
    EndIf

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

    If $aItem[3] = "OpenSSH Server" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    RunWait(@ComSpec & " /c " & 'sc start OpenSSHd', "", @SW_HIDE)
    $PID = ProcessExists($process[$i])
    If $PID <> 0 Then
    _GUICtrlStatusBar_SetText($hStatus, "Start - " & $aItem[3], 1)
    delay()
    set_yes($i)
    Else
    $nr = $nr + 1
    set_no($i)
    EndIf
    EndIf

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

    If $aItem[3] = "FABS - Helping agent for MAGIX media database" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    RunWait(@ComSpec & " /c " & 'sc start Fabs', "", @SW_HIDE)
    $PID = ProcessExists($process[$i])
    If $PID <> 0 Then
    _GUICtrlStatusBar_SetText($hStatus, "Start - " & $aItem[3], 1)
    delay()
    set_yes($i)
    Else
    $nr = $nr + 1
    set_no($i)
    EndIf
    EndIf

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

    If $aItem[3] = "Print queue (Spooler)" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    RunWait(@ComSpec & " /c " & 'sc start spooler', "", @SW_HIDE)
    $PID = ProcessExists($process[$i])
    If $PID <> 0 Then
    _GUICtrlStatusBar_SetText($hStatus, "Start - " & $aItem[3], 1)
    delay()
    set_yes($i)
    Else
    $nr = $nr + 1
    set_no($i)
    EndIf
    EndIf

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

    If $aItem[3] = "Raxco - PerfectDisk (PDScheduler)" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    RunWait(@ComSpec & " /c " & 'sc start PDSched', "", @SW_HIDE)
    $PID = ProcessExists($process[$i])
    If $PID <> 0 Then
    _GUICtrlStatusBar_SetText($hStatus, "Start - " & $aItem[3], 1)
    delay()
    set_yes($i)
    Else
    $nr = $nr + 1
    set_no($i)
    EndIf
    EndIf

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

    If $aItem[3] = "TuneUp Utilities Service (2010)" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    RunWait(@ComSpec & " /c " & 'sc start TuneUp.UtilitiesSvc', "", @SW_HIDE)
    $PID = ProcessExists($process[$i])
    If $PID <> 0 Then
    _GUICtrlStatusBar_SetText($hStatus, "Start - " & $aItem[3], 1)
    delay()
    set_yes($i)
    Else
    $nr = $nr + 1
    set_no($i)
    EndIf
    EndIf

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

    If $aItem[3] = "VMLite Host Service" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    RunWait(@ComSpec & " /c " & 'sc start VMLiteService', "", @SW_HIDE)
    $PID = ProcessExists($process[$i])
    If $PID <> 0 Then
    _GUICtrlStatusBar_SetText($hStatus, "Start - " & $aItem[3], 1)
    delay()
    set_yes($i)
    Else
    $nr = $nr + 1
    set_no($i)
    EndIf
    EndIf

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

    If $aItem[3] = "VMware NAT Service" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    RunWait(@ComSpec & " /c " & 'sc start "VMware NAT Service"', "", @SW_HIDE)
    $PID = ProcessExists($process[$i])
    If $PID <> 0 Then
    _GUICtrlStatusBar_SetText($hStatus, "Start - " & $aItem[3], 1)
    delay()
    set_yes($i)
    Else
    $nr = $nr + 1
    set_no($i)
    EndIf
    EndIf

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

    If $aItem[3] = "VMware DHCP Service" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    RunWait(@ComSpec & " /c " & 'sc start VMnetDHCP', "", @SW_HIDE)
    $PID = ProcessExists($process[$i])
    If $PID <> 0 Then
    _GUICtrlStatusBar_SetText($hStatus, "Start - " & $aItem[3], 1)
    delay()
    set_yes($i)
    Else
    $nr = $nr + 1
    set_no($i)
    EndIf
    EndIf

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

    If $aItem[3] = "VMware Authorization Service" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    RunWait(@ComSpec & " /c " & 'sc start VMAuthdService', "", @SW_HIDE)
    $PID = ProcessExists($process[$i])
    If $PID <> 0 Then
    _GUICtrlStatusBar_SetText($hStatus, "Start - " & $aItem[3], 1)
    delay()
    set_yes($i)
    Else
    $nr = $nr + 1
    set_no($i)
    EndIf
    EndIf

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

    If $aItem[3] = "VMware Agent Service" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    RunWait(@ComSpec & " /c " & 'sc start ufad-ws60', "", @SW_HIDE)
    $PID = ProcessExists($process[$i])
    If $PID <> 0 Then
    _GUICtrlStatusBar_SetText($hStatus, "Start - " & $aItem[3], 1)
    delay()
    set_yes($i)
    Else
    $nr = $nr + 1
    set_no($i)
    EndIf
    EndIf

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

    If $aItem[3] = "VMware USB Arbitration Service" And _GUICtrlListView_GetItemChecked($hListView, $i) = True Then
    RunWait(@ComSpec & " /c " & 'sc start VMUSBArbService', "", @SW_HIDE)
    $PID = ProcessExists($process[$i])
    If $PID <> 0 Then
    _GUICtrlStatusBar_SetText($hStatus, "Start - " & $aItem[3], 1)
    delay()
    set_yes($i)
    Else
    $nr = $nr + 1
    set_no($i)
    EndIf
    EndIf

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

    EndIf
    Next
    $wahl = 0
    GUICtrlSetTip($Button_1, 'All selected services are turned on') ; Tooltip aktivieren
    EndFunc ;==>Process_on

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

    Func delay()
    $begin = TimerInit()
    $tf = 1
    While $tf = 1
    MyTimer()
    WEnd
    EndFunc

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

    ; Timer prüfen
    Func MyTimer()
    Switch TimerDiff($begin)
    Case $timer * 1000 To ($timer + 1) * 1000
    ; Wenn die Zeit abgelaufen ist...
    _GUICtrlStatusBar_SetText($hStatus, "", 1) ;Status löschen
    $tf = 0 ; Timer ausschalten
    EndSwitch
    EndFunc ;==>MyTimer

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

    Func set_no($r)
    _GUICtrlListView_SetItemChecked($hListView, $r, False)
    _GUICtrlListView_AddSubItem($hListView, $r, "No", 1)
    $nr = $nr - 1
    Show_Active_Processes()
    EndFunc ;==>set_no

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

    Func set_yes($r)
    _GUICtrlListView_SetItemChecked($hListView, $r, False)
    _GUICtrlListView_AddSubItem($hListView, $r, "Yes", 1)
    $nr = $nr + 1
    Show_Active_Processes()
    EndFunc ;==>set_yes

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

    Func Show_Active_Processes()
    GUICtrlCreateLabel($Active_Text & '[ ' & $nr & ' ]', 285, 20)
    EndFunc

    [/autoit]

    PS: Noch eine Frage : Ist es möglich eine Inputbox daran zu hindern deren größe mit der Maus zu verändern ???
    Für eine Antwort wäre ich dankbar...

    PS2: Das Script werden wohl viele nicht benötigen, ich aber schon ....

    So, das war mal wieder von mir

    mfg
    tv_freeze