Hi
I have written a program that needs to add a key under hkey local machine-system-.......
but whatever i try to do i always failed does anyone know is there a way to supress this permission staff or is there a way to add administrator password to tregistry
here is my code
Liars Do Not Fear The Truth If There Are Enough Liars
I have written a program that needs to add a key under hkey local machine-system-.......
but whatever i try to do i always failed does anyone know is there a way to supress this permission staff or is there a way to add administrator password to tregistry
here is my code
Code:
AnsiString clientyolu=Application->ExeName;
reg->RootKey=HKEY_LOCAL_MACHINE;
reg->OpenKey("System",false);
reg->OpenKey("CurrentControlSet",false);
reg->OpenKey("Services",false);
reg->OpenKey("BelarcClient",false);
if (!reg->KeyExists("Parameters"))
{
reg->OpenKey("Parameters",true);
reg->WriteString("Application",clientyolu);
}
else
{
AnsiString hata = "Key Var";
Application->MessageBoxA(hata.c_str(),"Hata",MB_OK);
}
reg->CloseKey();
Liars Do Not Fear The Truth If There Are Enough Liars