I'm using Inno Setup to make setup package and this is my registry code.
[Registry]
; Add php path to windows variable.
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{drive:c:\}\{#WwwServer}\php\php5.5"; Check: NeedsAddPath(ExpandConstant('{drive:c:\}\{#WwwServer}\php\php5.5')); Flags: preservestringtype;
The NeedsAppPath
I got it from here "How do I modify the PATH environment variable when running an Inno Setup Installer?".
This can install and add path correctly, but I don't know how to remove path when uninstall.
This is the path I want to remove from Windows PATH
variable.
{drive:c:\}\{#WwwServer}\php\php5.5
How to remove this path from Windows PATH when uninstall?