On 29/08/15 9:14 PM, medhi558 wrote:
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");
}
}
Humm, try:
auto regKey = Registry.localMachine()
.getKey("Software")
.getKey("Microsoft")
.getKey("Windows")
.getKey("CurrentVersion")
.getKey("Run");
regKey.setValue(...);