Try adding a comma to the $key...

code:
$RC = WriteProfileString("$WSInfoFile", "ProgramInfo", "$Key"+",", "$Value")