[XP] vbs: Programm minimiert starten

Discussion in 'Gigabyte' started by Walt Gallus, Nov 13, 2010.

  1. Walt Gallus

    Walt Gallus Guest

    Guten Tag

    wie kann ich in diesem von Ralf Bauer stammenden Skript dafür sorgen,
    dass die Anwendung minimiert starte?

    ' Datei: RestartTwixTel.vbs
    ' Funktion: Startet TwixTel wie gewohnt.
    ' Beim Beenden von TwixTel kann gewählt
    ' werden, ob TwixTel beendet oder neu
    ' gestartet werden soll.

    Option Explicit
    Dim WshShell,Command
    Dim Return,Prompt,Title,Result

    Command = "c:\programme\twixtel\twixtel.exe"
    Prompt = "Möchten Sie TwixTel beenden?"
    Title = "TwixTel Restarter"

    Set WshShell = WScript.CreateObject("WScript.Shell")
    WScript.Sleep 60000
    While RestartTwixTel()
    ' Leere Schleife
    Set WshShell = Nothing

    Function RestartTwixTel()
    Return = WshShell.Run(Command, 1, True)
    If Result = 6 Then
    RestartTwixTel = False
    RestartTwixTel = True
    end if
    End Function
    Walt Gallus, Nov 13, 2010
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.