Please reply using this URL only: http://bugs.wpkg.org/show_bug.cgi?id=47

           Summary: [patch] Expand environment strings for registry checks
           Product: WPKG
           Version: 0.9.10
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: wpkg.js
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [email protected]


This was so I could check that a certain value contained
"C:\Windows\System32\....", but in packages.xml it's entered as
"%SystemRoot%\System32\....".

--- wpkg.js.orig        2006-12-21 10:47:20.000000000 -0500
+++ wpkg.js     2006-12-21 16:13:20.574364367 -0500
@@ -1085,7 +1087,11 @@
             }
         } else if (checkCond == "equals") {
             var val = getRegistryValue(checkPath);
-
+
+            // expand environment strings in the testing value
+            var shell = new ActiveXObject("WScript.Shell");
+            checkValue=shell.ExpandEnvironmentStrings(checkValue);
+
             if (val == checkValue) {
                 // Some debugging information
                 dinfo("The registry path '"+checkPath+"' contained the correct
value: '"+

-- 
Configure bugmail: http://bugs.wpkg.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
wpkg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wpkg-users

Reply via email to