Sub ForceCscript() 'If running under WSCRIPT, re-run the script with CSCRIPT Dim ws, fs, strCmd, intArg If Lcase(Right(Wscript.FullName, 12)) = "\cscript.exe" Then Exit Sub 'Start building the necessary command line to re-launch the script Set ws = CreateObject("Wscript.Shell") Set fs = CreateObject("Scripting.FileSystemObject") strCmd = fs.BuildPath(fs.GetParentFolderName(Wscript.FullName), "cscript.exe") 'Add quotes in case engine has spaces in the path If Left(strCmd, 1) <> """" Then strCmd = """" & strCmd & """" End If 'Add the script name (with quotes just in case) strCmd = strCmd & " """ & WScript.ScriptFullName & """" 'Add arguments if there are any If WScript.Arguments.Count > 0 Then For intArg = 0 To WScript.Arguments.Count - 1 'If there is a space in an argument, add quotes around the argument If InStr(WScript.Arguments(intArg), " ") <> 0 Then strCmd = strCmd & " """ & WScript.Arguments(intArg) & """" Else strCmd = strCmd & " " & WScript.Arguments(intArg) End If Next End If 'Run the script again with CSCRIPT. Kill this WSCRIPT instance. ws.Run strCmd, 1, False WScript.Quit End Sub