ForceWScript Main Sub Main WScript.Echo "This script is running in the WScript script host" End Sub Sub ForceWScript() 'Declare local variables Dim strHost Dim strCmdLine Dim objShell Dim objFSO 'Determine the current script host strHost = Right(WScript.FullName, 11) strHost = LCase(strHost) 'Check if we need to restart ourselves If strHost <> "wscript.exe" Then 'Create objects Set objShell = CreateObject("WScript.Shell") Set objFSO = CreateObject("Scripting.FileSystemObject") 'Build the command line 'Add the desired scripting host strCmdLine = Chr(34) & objFSO.BuildPath(WScript.Path, "wscript.exe") & Chr(34) 'Add a dividing space strCmdLine = strCmdLine & " " 'Add the path of the currently executing script strCmdLine = strCmdLine & Chr(34) & WScript.ScriptFullName & Chr(34) 'Run the script objShell.Run strCmdLine 'Destroy objects Set objShell = Nothing Set objFSO = Nothing 'Quit the script WScript.Quit End If End Sub