Listing 4: getErrorDescription Function function getErrorDescription(n) { var tempname, cmdline, ts, result; // BEGIN CALLOUT A // Create a temporary filename. do tempname = FSO.BuildPath(FSO.GetSpecialFolder(TEMP_FOLDER), FSO.GetTempName()); while (FSO.FileExists(tempname)); // END CALLOUT A // Construct the command line. cmdline = FSO.BuildPath(FSO.GetSpecialFolder(SYSTEM_FOLDER), "cmd.exe") + " /c " + FSO.BuildPath(FSO.GetSpecialFolder(SYSTEM_FOLDER), "net.exe") + " helpmsg " + n.toString() + " > \"" + tempname + "\""; // Run the command and wait for it to finish. WshShell.Run(cmdline, 0, true); try { ts = FSO.OpenTextFile(tempname, FOR_READING); result = trim(ts.ReadAll()); } catch(err) { result = ""; } finally { ts.Close(); FSO.DeleteFile(tempname); } if (result == "") result = "Could not find an error description for error number " + n.toString() + "."; return result; }