I am writing a console application to check registry keys during a logon script.
Most of it is done, but I have a few problems which are most likely going to be easy, but I just cannot seem to fix it.
The syntax of the ini file is as follows
The two problems I have are
Reg.rootkey : if I use reg.rootkey := strtocard(ini.readstring(Header, 'Type', 'HKEY_CURRENT_USER)); it compiles, but does gives an error on reading the ini file.
I know the answer is staring me in the face, but I don't see it...
2nd, what would be the best way to check what type the value is (reg_sz, Reg_dword, Reg_binary)and if that is established to choose the correct ini.readxxxx routine. Right now I only check for strings, but would like to include integer values and binary. Or do I going to have to write 3 instances of ini.readxxx (as in "if string then ini.readstring", "if boolean then ini.readbool" etc..)and use booleans to activate them according to the type stated in the ini, or is there an easier (shorter) way.
I hope I made myself clear here... ;)