Page 1 of 1

Writing to registry fails

Posted: Thu May 27, 2010 8:48 am
by tosch
I'm trying to write the installation path to the registry under HKEY_LOCAL_MACHINE\Companyname\Applicationname and create a string value. This always fails saying the key could not be created.

I'm running this on Win7, the user is a local administrator on the machine.

Re: Writing to registry fails

Posted: Thu May 27, 2010 6:16 pm
by MichaelNesmith
Did you try to do the same thing in regedit.exe? Even that will cause an error like this:
---------------------------
Error Creating Key
---------------------------
Cannot create key: Error writing to the registry.
---------------------------
OK
---------------------------
Write under the SOFTWARE subkey.

Re: Writing to registry fails

Posted: Fri May 28, 2010 2:44 am
by tosch
ok, I tried to write to HKLM\Companyname\... instead of HKLM\Software\Companyname\...
Checked this several times but just didn't see it...
Thanks for your help anyway.

Thomas