in x64 Windows is there a way to run a Runtime.exec() process avoiding 'Registry redirection'
Our app runs in jvm 32 bit, even when in windows x64. Now, at some point, I need to access some registry values, for example HKEY_LOCAL_MACHINE/SOFTWARE/mycomp.
I do t开发者_运维技巧his by executing
cmd /C reg query HKEY_LOCAL_MACHINE\SOFTWARE\mycop
from Runtime.exec() and parsing the output. This works fine when running on windows 32b, the problem is when on x64, I cannot find the key, as the shell I run is a 32 bit process, and due to Registry Redirection I would get the key if it was on HKEY_LOCAL_MACHINE/SOFTWARE/wow6432Node/mycop
Any idea?
In case anybody tries this...I was not able to do this and had to resort to another approach that my scenario supported.
精彩评论