+----------------------------------------------------------------------+
*/
-// $Id: confutils.js,v 1.45 2004-08-03 00:02:48 wez Exp $
+// $Id: confutils.js,v 1.46 2004-08-03 00:58:29 wez Exp $
var STDOUT = WScript.StdOut;
var STDERR = WScript.StdErr;
thing_to_find = thing_to_find.replace(new RegExp("/", "g"), "\\");
- if (env_name != null) {
- env = WshShell.Environment("Process").Item(env_name);
- env = env.split(";");
- for (i = 0; i < env.length; i++) {
- file = glob(env[i] + "\\" + thing_to_find);
- if (file) {
- found = true;
- place = true;
- break;
- }
- }
- }
-
- if (!found && explicit_path != null) {
+ if (explicit_path != null) {
if (typeof(explicit_path) == "string") {
explicit_path = explicit_path.split(";");
}
}
}
+ if (!found && env_name != null) {
+ env = WshShell.Environment("Process").Item(env_name);
+ env = env.split(";");
+ for (i = 0; i < env.length; i++) {
+ file = glob(env[i] + "\\" + thing_to_find);
+ if (file) {
+ found = true;
+ place = true;
+ break;
+ }
+ }
+ }
+
if (found && place == true) {
STDOUT.WriteLine(" <in default path>");
} else if (found) {