Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

8
  • Does not provide a native implementation but just calls regedit.exe a lot. Commented Apr 7, 2019 at 16:19
  • Works just fine. Commented Oct 30, 2020 at 1:03
  • @AlexByrth may work fine for you, but (1) does not work for software that cannot write files locally, which does indeed happen, (2) will fail as soon as reg.exe changes the input or output format, (3) will fail when you code for corporate customers that, for some security reason, disable calling reg.exe, or calling any programs at all (yes, these do exist). Also, calling out to an external program is slow on Windows. Commented Dec 14, 2020 at 6:34
  • @toolforger, good points, but the proposed solution solved my issues. The situations you described are dead ends for several other options out there too. There is no easy general fix for this, except perhaps a full-featured installer package running as administrator. A bazooka to kill an ant. Commented Dec 22, 2020 at 13:55
  • @AlexByrth "works for me" is good for "needs to work for nobody except me" situations. Most code must work for others, and then solutions like those based on external programs that use an undocumented output format that may change with every Windows version simply don't fly. The JNA-based solutions work against a documented MS API - this doesn't mean it will never change, but at least you'll get a warning, and probably the JNA library will be updated in time so you won't even notice something changed. Commented Dec 22, 2020 at 16:27