Recently I was looking for a way to write to an INI file key with no value. I did not find any posted solutions. And so I tried it myself. Comments are welcome

 Code:
WriteEmptyProfileString("%TEMP%\WriteEmptyProfileString.ini","TestSection","TestKey")

function WriteEmptyProfileString($ini,$section,$key)
  $error=0
  $=writeprofilestring($ini,$section,$key,@CRLF+$key+"=")
  if @error
    $error=@error
  else
    $=writeprofilestring($ini,$section,$key)
    if @error
      $error=$error+@error*1000
    endif
  endif
  $writeemptyprofilestring=$error
endfunction