1
0
mirror of https://github.com/mintty/wsltty.git synced 2025-01-18 12:05:47 +00:00

uninstall to remove desktop shortcut (#184)

This commit is contained in:
mintty 2019-08-12 00:00:00 +02:00
parent 0799e4a69a
commit fabdf1ec30
2 changed files with 8 additions and 4 deletions

View File

@ -275,6 +275,14 @@ config () {
cmd /C del "%APPDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\$name Terminal.lnk"
cmd /C del "%LOCALAPPDATA%\\Microsoft\\WindowsApps\\$name.bat"
cmd /C del "%LOCALAPPDATA%\\Microsoft\\WindowsApps\\$name~.bat"
if [ "$name" = "WSL" ]
then
# determine actual Desktop folder
desktopkey='\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Desktop'
desktop=`regtool get "$desktopkey"`
cmd /C del "$desktop\\$name Terminal.lnk"
fi
else
# desktop shortcut in %USERPROFILE% -> Start Menu - WSLtty
cscript /nologo mkshortcut.vbs "/name:$name Terminal %"

View File

@ -9,10 +9,6 @@ rem delete Start Menu Folder
set smf=%APPDATA%\Microsoft\Windows\Start Menu\Programs\WSLtty
rmdir /S /Q "%smf%"
rem delete Desktop Shortcuts (not installed anymore)
rem del "%USERPROFILE%\Desktop\WSL % in Mintty.lnk"
rem del "%USERPROFILE%\Desktop\WSL ~ in Mintty.lnk"
:start menu