[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
    Wend
    Set WshShell = Nothing
    WScript.Quit

    Function RestartTwixTel()
    Return = WshShell.Run(Command, 1, True)
    Result=MsgBox(prompt,36,title)
    If Result = 6 Then
    RestartTwixTel = False
    else
    RestartTwixTel = True
    end if
    End Function
     
    Walt Gallus, Nov 13, 2010
    #1
    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.