If the environment variable is not defined, the method cannot "expand" the value and returns a string equal to the input.
var oShell = new ActiveXObject("WScript.Shell");
var strReturn = oShell.ExpandEnvironmentStrings("%MISSING%");
WScript.Echo(strReturn);
Example output: %MISSING%