-
Notifications
You must be signed in to change notification settings - Fork 1
/
Uninstall-Redate.bat
40 lines (33 loc) · 1.33 KB
/
Uninstall-Redate.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
36
37
38
39
40
@echo off
REM Define variables
set "destinationFolder=%USERPROFILE%\Redate"
set "shortcutPath=%APPDATA%\Microsoft\Windows\Start Menu\Programs\Redate.lnk"
set "updateShortcutPath=%APPDATA%\Microsoft\Windows\Start Menu\Programs\Redate.lnk"
set "updateScriptPath=%destinationFolder%\Redate.bat"
set "adminScriptPath=%destinationFolder%\Redate.bat"
set "updateUpdateScriptPath=%destinationFolder%\Update Redate.bat"
set "updateUpdateShortcutPath=%APPDATA%\Microsoft\Windows\Start Menu\Programs\Update Redate.lnk"
REM Prompt to confirm uninstallation
echo ------------------------------
echo Redate-Windows Uninstallation
echo ------------------------------
echo:
echo This script will uninstall Redate-Windows from the following location:
echo -----------------------------
echo %destinationFolder%
echo -----------------------------
echo:
set /p "choice=Do you want to continue with the uninstallation? (Y/N): "
if /i "%choice%" neq "Y" exit
REM Delete the Redate script and its folder
del /F /Q "%updateScriptPath%"
del /F /Q "%updateUpdateScriptPath%"
rmdir "%destinationFolder%" /Q
REM Delete the Redate-Windows shortcut from the Start Menu folder
del /F /Q "%shortcutPath%"
REM Delete the Redate Update script shortcut from the Start Menu folder
del /F /Q "%updateUpdateShortcutPath%"
echo:
echo Redate-Windows uninstallation completed.
echo:
pause