Brian and AHJ,

You are right. When Regedit exports strings containing backslashes they are doubled.
An example is this:

In KiX, the code should be written as:

So to make a fully functional Registry-UDF, we have to remove every second backslash in strings
read from reg-files and substitute every \" with "

Another problem is, that equal signs are allowed in both valuenames and stringvalues.

Try to make the logic for transforming this regfile to a KiX-script:
[HKEY_CURRENT_USER\Software\KiXtart\Test ]
"A1=\"\\A2\"\\" = "A3=\\\"A4\\\""

The KiX script should look someting like this:
$RC = AddKey('HKEY_CURRENT_USER\Software\KiXtart\Test')
$RC = WriteValue('HKEY_CURRENT_USER\Software\KiXtart\Test','A1="\A2"\','A3=\"A4\"','REG_SZ')

The problem is the equal sign in the valuename. You can's split the valuename from the value using
InStr() to find the first equal sign !!

There might be other exceptions, but i don't believe we shall count them in during this 'golfmatch'.
But the next challenge will be to make a fully functional UDF to take all these 'strange' behaviours
into account.


My KiX-score at this moment is about 2000.
Even without the issue of \\ \" and Equal-signs in valuenames, i have never been under 1300 in KiX-score,
so i belive i will just step back and wait for the final result [Wink]

The second 'regfile' is fully legal, working on both Win9x and XP.
I can't imagine who should want to make values and valuenames with contents like this.
But you never know [Roll Eyes]

[ 16 July 2002, 23:56: Message edited by: kholm ]