@echo off
setlocal

set "INSTALL_DIR=%LOCALAPPDATA%\Tugsscript"
set "LAUNCHER=%USERPROFILE%\.local\bin\tugs.cmd"
set "BIN_DIR=%USERPROFILE%\.local\bin"

if exist "%LAUNCHER%" del /Q "%LAUNCHER%"
if exist "%INSTALL_DIR%" rmdir /S /Q "%INSTALL_DIR%"
powershell -NoProfile -ExecutionPolicy Bypass -Command "$bin = '%BIN_DIR%'; $path = [Environment]::GetEnvironmentVariable('Path', 'User'); $newPath = (($path -split ';' | Where-Object { $_ -and $_ -ne $bin }) -join ';'); [Environment]::SetEnvironmentVariable('Path', $newPath, 'User')"

echo Tugsscript устгагдлаа.
