mirror of
https://github.com/mintty/wsltty.git
synced 2025-01-18 20:10:58 +00:00
tweak removal of ALL previous shortcuts, also on reconfigure (#218)
This commit is contained in:
parent
9ae697ac20
commit
00c4c2f20b
@ -38,22 +38,6 @@ case "$1" in
|
|||||||
shift;;
|
shift;;
|
||||||
-shortcuts-remove)
|
-shortcuts-remove)
|
||||||
remove=true
|
remove=true
|
||||||
|
|
||||||
(cd "$INSTDIR"
|
|
||||||
for lnk in *.lnk
|
|
||||||
do
|
|
||||||
if cmd /C comp/M "$lnk" "%APPDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\$lnk"
|
|
||||||
then cmd /C del "%APPDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\$lnk"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
for bat in *.bat
|
|
||||||
do
|
|
||||||
if cmd /C comp/M "$bat" "%LOCALAPPDATA%\\Microsoft\\WindowsApps\\$bat"
|
|
||||||
then cmd /C del "%LOCALAPPDATA%\\Microsoft\\WindowsApps\\$bat"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
)
|
|
||||||
|
|
||||||
shift;;
|
shift;;
|
||||||
-contextmenu)
|
-contextmenu)
|
||||||
contextmenu=true
|
contextmenu=true
|
||||||
@ -92,6 +76,25 @@ case "$1" in
|
|||||||
shift;;
|
shift;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if $config && ! $contextmenu
|
||||||
|
then
|
||||||
|
# remove shortcut entries in Start menu and cmd-line bat shortcuts
|
||||||
|
(cd "$INSTDIR"
|
||||||
|
for lnk in *.lnk
|
||||||
|
do
|
||||||
|
if cmd /C comp/M "$lnk" "%APPDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\$lnk"
|
||||||
|
then cmd /C del "%APPDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\$lnk"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
for bat in *.bat
|
||||||
|
do
|
||||||
|
if cmd /C comp/M "$bat" "%LOCALAPPDATA%\\Microsoft\\WindowsApps\\$bat"
|
||||||
|
then cmd /C del "%LOCALAPPDATA%\\Microsoft\\WindowsApps\\$bat"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
# test w/o WSL: call this script with REGTOOLFAKE=true dash config-distros.sh
|
# test w/o WSL: call this script with REGTOOLFAKE=true dash config-distros.sh
|
||||||
if ${REGTOOLFAKE:-false}
|
if ${REGTOOLFAKE:-false}
|
||||||
then
|
then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user