-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpre-uninstall.bat
35 lines (32 loc) · 1.2 KB
/
pre-uninstall.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
@ECHO OFF
ECHO Configuring JumboConda... Do not close command prompt.
SET PATH=%PATH%;"C:\Windows\System32\"
REM remove environment variables
REG DELETE "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /V OUTDATED_IGNORE /F
IF %ERRORLEVEL% NEQ 0 (
REG DELETE "HKCU\Environment" /V OUTDATED_IGNORE /F
)
REG DELETE "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /V USE_PYGEOS /F
IF %ERRORLEVEL% NEQ 0 (
REG DELETE "HKCU\Environment" /V USE_PYGEOS /F
)
REM remove jupyterlab desktop configuration
IF "%PREFIX:users=%"=="%PREFIX%" (
REM systemwide installation
FOR /F "delims=" %%d IN ('dir /AD /B "%SYSTEMDRIVE%\Users"') DO (
IF /I "%%d" NEQ "All Users" (
IF /I "%%d" NEQ "Default User" (
IF /I "%%d" NEQ "Public" (
IF EXIST "%SYSTEMDRIVE%\Users\%%d\AppData\Roaming\jupyterlab-desktop\" (
RMDIR "%SYSTEMDRIVE%\Users\%%d\AppData\Roaming\jupyterlab-desktop" /S /Q
)
)
)
)
)
) ELSE (
REM single user installation
IF EXIST "%APPDATA%\jupyterlab-desktop\" (
RMDIR "%APPDATA%\jupyterlab-desktop" /S /Q
)
)