Announcement

Collapse
No announcement yet.

Buggy: Registry.GetValueNames on some Keys

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Buggy: Registry.GetValueNames on some Keys

    On a standard User Account, with UAC, with a runtime manifested: 'AsInvoker'
    Registry.GetValueNames can fail to enumerate on a target Key.
    (please no lectures on UAC, account types, manifests, ACL's etc.)

    try this code on a known key that should enumerate the values properly with 'AsInvoker':
    (if you target a known value name in the target Key with Registry.GetValue, it works)

    AMS 8.5.0.0 on Win 8.1 (update 1) + all updates:

    Code:
    local function TestIRregAccess()
    	Debug.Clear(); Debug.ShowWindow(true);
    	local hKeyPath="Software\\Microsoft\\Windows\\CurrentVersion\\Run";
    	Debug.Print("\r\nTest getkeynames on HKLM: "..tostring(hKeyPath));
    	local bR = Registry.GetAccess(3, hKeyPath, 131097);
    	Dialog.Message('read access on key',tostring(bR))
    	local bE = Registry.GetAccess(3, hKeyPath, 8);
    	Dialog.Message('enumeration access on key',tostring(bE))
    	--
    	local t = Registry.GetValueNames(3, hKeyPath,true);
    	if t then
    		for k,v in pairs(t) do
    			local value = Registry.GetValue(3, hKeyPath, v, false)
    			Debug.Print("\r\nname: "..v.."\r\npath: "..value)	
    		end
    	else
    		Dialog.Message('error','IR enumeration values failed');					
    	end
    
    end TestIRregAccess();
    FWIW UlRICH's Wow64 plugin(32bit access key), one I rolled myself, both enumerate values properly Without the Runtime having to be manifested with higher priveliges.

    It appears the correct access token or access flags are not being passed properly to this IR action

    cheers MTN

    Please consider reworking the Registry suite of actions to include the passing of the alternate registry view flags C side eg :

    #define flagV64 (KEY_WOW64_64KEY)
    #define flagV32 (KEY_WOW64_32KEY)

    to open this thing up to Developers creating Apps to run on x64 Windows
    Last edited by Eagle; 07-07-2015, 01:43 PM. Reason: additional

  • #2
    Originally posted by Eagle
    Has anyone actually tested this on their system with IR's action or the Wow64 plugin with a runtime manifested 'AsInvoker' and found the results as i have ?
    I could reproduce the issue. My plugin indeed works properly, and the built-in action returns an error. I'll file a report for this, so it can be fixed in the future.

    Ulrich

    Comment


    • #3
      Cheers Ulrich, I had a feeling you would get to it when you could :yes

      (waiting for Windows 10 RTM release testing for the IR devs, probably in mind )

      I had not read your post before i posted a reply to the others ...

      Comment


      • #4
        Dev Team: v8.5.1.0 sweet (also on Win 10 RTM 10240 and later official core updates)

        Comment

        Working...
        X