Restarting a script in cscript when started from wscript
' Open a script in a console window when started by clicking on it (started through wscript)
Option Explicit

' Check if running under "WScript", and if so, relaunch myself cscript and exit
If InStr(1, WScript.FullName, "WScript.exe", vbTextCompare) <> 0 Then
        Dim objShell
        Set objShell = CreateObject("WScript.Shell")
        objShell.Run "%comspec% /c cscript /nologo """ & WScript.ScriptFullName & """", 1, False
End If

' If we make it to here, we're running under cscript with a cmd window
WScript.Echo "Using: " & WScript.FullName
WScript.Echo "...Do stuff in cscript here..."