Archive: Complete removal of environment variable?


Complete removal of environment variable?
  Hello,

I'm trying complete deletion of an environment variable on uninstall, using this command:

${un.EnvVarUpdate} $0 ${C_PGENVVARIABLE} "R" "HKLM" "$INSTDIR\etc"

Of course C_PGENVARIABLE holds the name of the variable.

The variable is emptied but not removed. Is there an easy way to force complete variable removal?

Thanks,
Mario


Just delete the registry value, then signal to windows you changed things around:


5000 

>

Oh, that's cool: no more need for ${envUpdate} then, just Write and Delete registry keys :)

Thank you,
Mario


Oh, that's cool: no more need for ${envUpdate} then, just Write and Delete registry keys :)

Thank you,
Mario


Yup. EnvVarUpdate is more useful if you have something like the PATH environment variable where there are multiple values that you'd want to manipulate. Deleting the PATH environment variable would be a Bad Thing™ ;)