-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Advapi32Util can't read from registry as non-admin #101
Comments
The above is from 3.4.1 (I think), just grabbed it from your dist directory a couple of days ago.. |
This could be a WOW64 redirect problem, maybe? http://msdn.microsoft.com/en-us/library/windows/desktop/aa384182(v=vs.85).aspx |
I know this is old, but I ran into the same problem and didn't find a clear answer. It is exactly as dblock mentioned, a WOW64 redirect problem. I was getting the same error as above, and upon doing a listing of HKEY_LOCAL_MACHINE\Software, realized windows was silently redirecting to the HKEY_LOCAL_MACHINE\Wow64Node\Software node based on the results returned. This was also causing my reads and writes to keys under the Software parent node to fail, because they didn't exist under the Wow64Node node. After reading up on windows registry redirector { For example, in registryKeyExists, instead of: You basically need to change the "REGSAM samDesired" parameter on the RegOpenKeyEx calls to have the view mask needed - I also ended up using the static variable WinNT.KEY_WOW64_64KEY instead of 0x0100 in the code to keep it cleaner instead of the above, but thought I'd leave the bitmask above in since it relates to the MSDN note a little clearer. Good luck! -- By the way, this issue was with a fresh pull today of jna and platform versions 3.5.2 |
This just says that we need to expose an additional parameter to the utility method so that the value of |
Closing this as fix was merged a long time ago. |
…ading streams. (java-native-access#101) Motivation: We should support using AUTO_READ false and also be able to set read limits in general. Modifications: - Support manually reading - Support limit the number of datagrams to read per read() operations. - Support autoread setting for processing streams on the quic channel Result: Related to netty/netty-incubator-codec-quic#95
No problem reading as a user with admin privileges, but as non-admin I get:
com.sun.jna.platform.win32.Win32Exception: The system cannot find the file specified.
at com.sun.jna.platform.win32.Advapi32Util.registryGetStringValue(Advapi32Util.java:508)
Note this is reading from HKEY_CURRENT_USER, and I'm able to read through calling out to REG through Windows command prompt (from same Java process as gave the above error..).
The text was updated successfully, but these errors were encountered: