3

While I can create/change almost any key in HKEY_CURRENT_USER, it doesn't seem possible to invoke the following command via Runtime.getRuntime().exec(...):

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v "ProxyOverride" /d "<local>" /f

The result of this command is always 0 (success).

Adding different keys via Java works flawlessly. However this one specific key is not visible in regedit afterwards.

Has my Java process different privileges than cmd? Both run with the same user (verified by invoking whoami).


Edit: The solution proposed by David in read/write to Windows Registry using Java doesn't work either.


Edit 2: Turns out, it did actually work but was immediately revoked by a following invocation of a net use command.

Community
  • 1
  • 1
Sebastian S
  • 4,420
  • 4
  • 34
  • 63
  • possible duplicate of [read/write to Windows Registry using Java](http://stackoverflow.com/questions/62289/read-write-to-windows-registry-using-java) – Sebastian S Mar 11 '15 at 20:24

0 Answers0