setx FOOBAR ""
just causes the value of FOOBAR to be a null string. (Although, it shows with the set
command with the "" so maybe double-quotes is the string.)
I used:
set FOOBAR=
and then FOOBAR was no longer listed in the set command. (Log-off was not required.)
Windows 7 32 bit, using the command prompt, non-administrator is what I used. (Not cmd or Windows + R, which might be different.)
BTW, I did not see the variable I created anywhere in the registry after I created it. I'm using RegEdit not as administrator.