English 中文(简体)
32bit application access to 64bit registry
原标题:

I have an OS Shell written in 32bit that is replacing the Explorer.exe of a Vista machine. I run a utility which is also written in 32bit, which allows to switch between the Explorer shell and My shell. With some of the machines being 64bit based I can not Alter the HKLMMicrosoftcurrentshell Key (short formed reg key). I end up getting intercepted by the WOW64 subkey redirection.. and effectively the changes to the shell key do not take place. Microsofts BS about realtime Redirection is not exactly true. That is one key that does not redirect unless you restart the whole-machine.

So I am looking for a solution to Either UPDATE that redirected key and have it load.

The Shell replacement is a Point of Sales software. My GUI utility will run 32bit command prompts only or batch files run as 32bit..

Can I Execute or call another batch file like a 64bit from a 32bit ?

问题回答

Check out MSDN for details on how to access the exact hive you want

The KEY_WOW64_64KEY and KEY_WOW64_32KEY flags enable explicit access to the 64-bit registry view and the 32-bit view, respectively.

Take a look at this article on MSDN for Accessing an Alternate Registry View. This should provide a way to modify the 64bit key from a 32bit process, but you will need to write code wither in C or C# (or do it through WMI).





相关问题
complex batch replacement linux

I m trying to do some batch replacement for/with a fairly complex pattern So far I find the pattern as: find ( -name *.php -o -name *.html ) -exec grep -i -n hello {} + The string I want ...

How to split a string by spaces in a Windows batch file?

Suppose I have a string "AAA BBB CCC DDD EEE FFF". How can I split the string and retrieve the nth substring, in a batch file? The equivalent in C# would be "AAA BBB CCC DDD EEE FFF".Split()[n]

How to check which Operating System?

How can I check OS version in a batch file or through a vbs in an Windows 2k/2k3 environment ? You know ... Something like ... : "If winver Win2k then ... or if winver Win2k3 then ....

热门标签