After reading this post on SO, I tried to write a small application that I need to read and write hidden keys / key values.
I checked “Manipulating the registry” using the NT Native API and Creating a “Hidden” Value registry .
At first I gave me something to work with, but it is written in C ++, and the second is a Delphi project that works well.
I cannot convert the first, and I could try to convert the second, but I will need to find the code to read the keys / values. For this reason, I would like to know if there is something "ready" and tested in C #.
I also downloaded Hacker v1.11 asks for the source code and used it to partially convert the Delphi example, as shown below, but the hidden registry key is available (while in Delphi it is not) and there are no APIs for writing values.
static void Main(string[] args) { string KeyNameBuffer = @"\Registry\User\S-1-5-21-3979903645-2167650815-2353538381-1001\SOFTWARE"; string NewKeyNameBuffer = "Systems Internals"; string HiddenKeyNameBuffer = "Can't touch me\0"; string HiddenValueNameBuffer = "Hidden Value";
Finally: from Vista, you cannot write the \Registry\Machine part if you are not using the application as an administrator, so in this example I used my user registry key. Is there a way to use the built-in APIs to write this part of the registry if I need to save a value for each machine?
Marco source share