Thread overview
How to use std.windows.registry, there are no documentations.
Nov 24, 2021
BoQsc
Nov 27, 2021
Imperatorn
Nov 30, 2021
BoQsc
November 24, 2021

On Thursday, 11 July 2019 at 08:53:35 UTC, BoQsc wrote:

>

https://dlang.org/phobos/std_windows_registry.html
https://github.com/dlang/phobos/blob/master/std/windows/registry.d

Can someone provide some examples on how to:
set, change, receive something from the Windows registry using Phobos std.windows.registry library?


import std.stdio;
import std.windows.registry;

void main(string[] args)
{
    writeln("hello world");
    writefln("args.length = %d", args.length);

    foreach (index, arg; args)
    {
        writefln("args[%d] = '%s'", index, arg);
    }
	writeln();
	writeln(Registry.localMachine().name);
	writeln(Registry.localMachine().getKey("System\\CurrentControlSet\\Control\\Session Manager\\Environment").name);
	writeln(Registry.localMachine().getKey("System").keyCount);
	writeln(Registry.localMachine().getKey("System").valueCount);
	writeln(Registry.localMachine().getKey("System\\CurrentControlSet\\Control\\Session Manager\\Environment").valueCount);
	write(Registry.localMachine().getKey("System\\CurrentControlSet\\Control\\Session Manager\\Environment").getValue("Path").value_EXPAND_SZ);
	Registry.currentUser().createKey("test");

}

November 27, 2021

On Wednesday, 24 November 2021 at 12:07:44 UTC, BoQsc wrote:

>

On Thursday, 11 July 2019 at 08:53:35 UTC, BoQsc wrote:

>

[...]


import std.stdio;
import std.windows.registry;

[...]

You could add some examples to the documentation if you like ☀️

November 30, 2021

On Saturday, 27 November 2021 at 19:59:24 UTC, Imperatorn wrote:

>

On Wednesday, 24 November 2021 at 12:07:44 UTC, BoQsc wrote:

>

On Thursday, 11 July 2019 at 08:53:35 UTC, BoQsc wrote:

>

[...]


import std.stdio;
import std.windows.registry;

[...]

You could add some examples to the documentation if you like ☀️

I'll certaintly will, as that's the only way to keep some kind of reference point and not make it all lost. It might take a while since various things going on at the same time for the next few months.