Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Reading from and writing to Win7 64-bit registry

If you have a question or need help, this is the place to be.
Post Reply
Krog
Posts: 7
Joined: Sun Oct 24, 2010 4:45 pm

Reading from and writing to Win7 64-bit registry

Post by Krog »

Hi all.

I really need to change a reg-key in the registry on my Win7 64-bit machine - but it seems that the built-in registry key changer in EventGhost only works on 32-bit systems. Can anyone point me in the right direction?

PS: I am a noob at Python.

Yours

Michael
Krog
Posts: 7
Joined: Sun Oct 24, 2010 4:45 pm

Re: Reading from and writing to Win7 64-bit registry

Post by Krog »

A lot of views, but no replies. :-)

Nevermind: Solved it myself. If you modify c:\Program Files (x86)\EventGhost\plugins\System\Registry.py line 698 from:

_winreg.KEY_WRITE | _winreg.KEY_READ

...to...

_winreg.KEY_WRITE | _winreg.KEY_READ | _winreg.KEY_WOW64_64KEY

...it works on a 64-bit Win7. In all fairness, there should be some kind of check whether the OS is 64-bit, but I don't need it in my current environment.

Yours

Michael
User avatar
zian
Site Admin
Posts: 569
Joined: Wed Jun 24, 2009 3:54 pm

Re: Reading from and writing to Win7 64-bit registry

Post by zian »

Thanks Micheal,
For letting us know how you fixed it.
eventghost.net
Be there or be square.
eatmeimadanish
Experienced User
Posts: 118
Joined: Thu Oct 01, 2009 5:11 pm

Re: Reading from and writing to Win7 64-bit registry

Post by eatmeimadanish »

Just out of curiosity, after making this change, does it still work in 32bit windows? Would you mind testing?
Scope
Posts: 28
Joined: Tue Feb 22, 2011 5:19 pm

Re: Reading from and writing to Win7 64-bit registry

Post by Scope »

eatmeimadanish wrote:Just out of curiosity, after making this change, does it still work in 32bit windows? Would you mind testing?
No it will not work in 32-bit systems since it will access the 64-bit version of the registry-hive.
I think there should be a setting which you can use to remove that flag in order to access the 32-bit registry.
If you don't set it you always try to access the correct registry according to operating system.
Post Reply