@echo off
rem Takes Ganttwright out of Excel on this PC, for this Windows user: the
rem listing in Excel and Ganttwright's own folder. Your workbooks are left
rem as they are, the Ganttwright workbook on the Desktop among them.
setlocal
if not defined GANTTWRIGHT_SETUP_HOME set "GANTTWRIGHT_SETUP_HOME=%LOCALAPPDATA%\Ganttwright"
if not defined GANTTWRIGHT_SETUP_KEY set "GANTTWRIGHT_SETUP_KEY=HKCU\Software\Microsoft\Office\16.0\WEF\Developer"
set "GW_HOME=%GANTTWRIGHT_SETUP_HOME%"
set "GW_KEY=%GANTTWRIGHT_SETUP_KEY%"
set "GW_ID=8aab8b88-2e77-42a8-85af-7d1b7699e26f"
reg delete "%GW_KEY%" /v "%GW_ID%" /f >nul 2>nul
if exist "%GW_HOME%" rmdir /s /q "%GW_HOME%"
echo.
echo Ganttwright is no longer listed in Excel on this PC. Close Excel and open it again.
echo Your workbooks are left as they are.
echo.
if not defined GANTTWRIGHT_SETUP_QUIET pause
exit /b 0
