''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '' Copyright (C) Wizardry and Steamworks 2018 - License: GNU GPLv3 '' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' If WScript.Arguments.Count = 0 then WScript.Echo "Missing parameters" WScript.Quit 1 End If Set fileSystemObject = CreateObject("Scripting.FileSystemObject") If Not fileSystemObject.FileExists(WScript.Arguments.Item(0)) Then WScript.Echo "File not found" WScript.Quit 1 End If args = """" & WScript.Arguments.Item(0) & """" i = 1 Do While i < WScript.Arguments.Count args = args & " " & WScript.Arguments.Item(i) i = i + 1 Loop Set WshShell = CreateObject("WScript.Shell") Do While True WshShell.Run "" & args & "", 1, True If MsgBox("Restart shell?", vbYesNo + vbQuestion + vbSystemModal, "Choose options") = vbNo Then WScript.Quit 0 End If Loop