FUNCTION WSHVersion LOCAL lcWHSVersion, lcResultName, lcScriptName lcScriptName = Addbs(Sys(2023)) + Sys(2015) + ".vbs" lcResultName = Addbs(Sys(2023)) + Sys(2015) + ".tmp" * Create VB script that'll write WSH version to a file TEXT TO lcScript TEXTMERGE NOSHOW Dim fso, MyFile Set fso = CreateObject("Scripting.FileSystemObject") Set MyFile= fso.CreateTextFile("<<lcResultName>>", True) MyFile.WriteLine(WScript.Version) MyFile.Close ENDTEXT Strtofile(lcScript, lcScriptName) * Run script we created oShell = CREATEOBJECT('WScript.Shell') oShell.Run(lcScriptName, 0, .T.) * Read WSH version from the file lcWHSVersion = Filetostr(lcResultName) * Delete temp. files we created ERASE (lcScriptName) ERASE (lcResultName) RETURN lcWHSVersionKeep in mind, that version returned for WSH 2.0 is 5.1.