[wpkg-users] [PATCH] Check path expansion

Greg MacLellan greg at gregmaclellan.com
Fri Feb 3 17:58:59 CET 2006


Just a small thing- on Win2000, path expansion was not working so wpkg 
was unable to verify check type="file" paths that had things like 
%Windir% in them. Here is a quick patch to make this work:

--- wpkg/wpkg-0.9.2/wpkg.js     2005-12-09 16:15:53.000000000 -0500
+++ wpkg.js     2006-02-03 11:40:30.844800978 -0500
@@ -946,8 +946,9 @@
         }
     } else if (checkType == "file") {
         if (checkCond == "exists") {
+            var wso = new ActiveXObject("wScript.shell")
             var fso = new ActiveXObject("Scripting.FileSystemObject");
-            if (fso.FileExists(checkPath)) {
+            if (fso.FileExists( wso.expandEnvironmentStrings(checkPath) 
)) {
                 return true;
             }
         } else {





wpkg-users mailing list
wpkg-users at lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users




More information about the wpkg-users mailing list