Sunday 15 March 2015

windows 7 - Python winreg missing subkey on Win7 -


I'm thinking that Python module does not return all the subkeys and values ​​in the Winreg Win7 host.

If I use the local registry CMDline command to do the registry, I get the following:

  & gt; Reg Query "HKLM \ Software \ Microsoft \ Windows CurrentVersion \ Authentication \ LogonUI \" HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Authentication \ LogonUI ShowTabletKeyboard REG_DWORD 0x0LastloggedRep_SZ {2A1ABE6F-476D-4E5B-FB68-21EF45555CC37} Last Logon SAMUGER REG_SZ DOMAIN \ USERNAME LastLoggedOnUser REG_SZ DOMAIN \ USERNAME HKEY_LOCAL_MACHINE \ Software \ Microsoft \ Windows \ CurrentVersion \ Authentication \ LogonUI \ Background HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Authentication \ LogonUI \ BootAnimation HKEY_LOCAL_MACHINE SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Authentication \ LogonUI \ LogonSoundPlayed HKEY_LOCAL_MACHINE SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Authentica If I use Python scripts to query the same place, then I only get the following values ​​and subkeys:  

P> regread.py value: software \ Microsoft \ Windows CurrentVersion \ Authentication \ LogonUI {'Showtele keyboard': 0}

  Subkeys: Software \ Microsoft \ Windows \ CurrentVersion \ Authentication \ LogonUI ['Background', 'Boot Animation']   

As you can see, some items are missing. Regread.py works fine when dragging other registry locations and is based on code posted by Tim Golden:

Does anyone know that Winreg does not return all values ​​and subkey from HKLM \ SOFTWARE Will be returning to the Microsoft Windows \ Windows Current Version \ Authentication \ Logon UI on the Windows 7 host I am the local administrator and also as a domain administrator, it still does not work. I am using dragon 3.3 (32 bit) and pywin32-218.

Once I know that this problem is

I had to use the following to get the registry value from the 64 bit host.

  key = Winreg.OpenKey (aReg, subkey, 0, (Winreg.KEY_WOW64_64KEY + Winreg.KEY_READ))   

(www.stackoverflow.com/ Question / 8506646 / change-64bit-registry-from-32-bit-dragon)

This site has a very simple explanation of what's happening:

python.6.x6. Nabble.com/ seven-64-bit-and-system 32-syswow64-paths-td4540789 .html

"All 64-bit commands live on 64-bit systems and under DLL \ windows \ system32 And live under 32-bit commands and DLLs \ Windows \ SysWOW64. 64 bit process happens to see those two directories because they are, but Re-writes the operating system for 32-bit process and when \ windows \ system32 references the OS, reference \ w Indos \ SysWOW64. "

No comments:

Post a Comment