exception ERegistryException with message 'Invalid data type for 'Anykey''

This exception generally raises during reading a Window Registry key value in Delphi. This exception raises when Type of stored value in Windows register is different from the type that we used for reading the registry value in Delphi. 

We mostly get this error for Binary Type(rdBinary) data. For this check if key values exists before do Read and check for data type too (if is compatible with ReadBinaryData)...
...
if reg.ValueExists(Key) then
    if reg.GetDataType(Key) = rdBinary then

Or 

You can do following rundown to solve this issue
- Close you program
- Open regedit
- Then Under File,click Export and keep a backup of systems registry
- Under "Edit" Tab. Go to Find and type the Key
- Delete the Key if found and continue till finish.
- Then restart your program again and it should work.

Or

if the data type is REG_DWORD then try to read/write data using ReadInteger()/WriteInteger() functions. ReadInteger() is the correct way to read REG_DWORD values.  The only way ReadInteger() could produce such as error is if the Registry value is not a REG_DWORD to begin with.




Comments

  1. Exception Eregistryexception With Message 'Invalid Data Type For 'Anykey'' >>>>> Download Now

    >>>>> Download Full

    Exception Eregistryexception With Message 'Invalid Data Type For 'Anykey'' >>>>> Download LINK

    >>>>> Download Now

    Exception Eregistryexception With Message 'Invalid Data Type For 'Anykey'' >>>>> Download Full

    >>>>> Download LINK Pw

    ReplyDelete

Post a Comment

Popular posts from this blog

ShellExecute in Delphi

How to send Email in Delphi?

Variants in Delphi. Use of Variant Array. How to check a Variant is unassigned or empty or clear ?