Remove part of PATH variable on uninstallation

Antworten
aellert
Beiträge: 37
Registriert: 16 Mai 2012, 11:30

Remove part of PATH variable on uninstallation

Beitrag von aellert »

Hi,

I've done a package which deploy some binaries and add a path to the PATH environment variable.
That was done using "supp" like it's shown in OPSI manual :

Code: Alles auswählen

DefVar $Path$
Set $Path$ = EnvVar ("Path")
Set $InstallDir$      = "C:\myapp"
...
Registry_PathPatch /32Bit
...
[Registry_PathPatch]
openkey [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\control\Session Manager\Environment]
set "Path"="$Path$"
supp "Path" ; "$InstallDir$\bin"
Now, i want to remove the additional path "C:\myapp\bin" from PATH when i remove the package.
Can you tell me what can I do ? Does a contrary of "supp" exists ?

Thanks.
Antworten