How to use Registry Windows ?
medhi558 via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Aug 29 02:14:03 PDT 2015
Hello,
I can't seem to use Registry, I tried to many attraction ways but
I have every time an error "Value cannot be set".
Exemple code :
module main;
import std.stdio;
import std.windows.registry;
void main(string[] args)
{
version(Windows)
{
Key registryKey = Registry.localMachine()
.createKey("Software")
.createKey("Microsoft")
.createKey("Windows")
.createKey("CurrentVersion")
.createKey("Run");
registryKey.setValue("key", "value");
}
}
More information about the Digitalmars-d-learn
mailing list