Debian Codegraph @

script/UNINSTALL.bat

raw
1 @echo off
2
3 :: installation path can be passed as argument
4 if [%1]==[] (
5 set "installpath=%ProgramFiles%\Environment Modules"
6 ) else (
7 set "installpath=%1"
8 )
9
10 :: remove bin directory from system path
11 set "binpath=%installpath%\bin"
12 setlocal enableextensions enabledelayedexpansion
13 set "NEWPATH=!PATH:%binpath%;=!"
14 if not "%NEWPATH%" == "%PATH%" (
15 set "PATH=%NEWPATH%"
16 setx /M PATH "%NEWPATH%"
17 )
18 if errorlevel 1 ( exit /b 1 )
19
20 :: remove installation directory and content
21 rd /s /q "%installpath%"
22 :: quit on error if directory still exists
23 if exist "%installpath%" ( exit /b 2 )
24
25 :: vim:set tabstop=3 shiftwidth=3 expandtab autoindent: