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

determine Desktop folder from registry (#166)

This commit is contained in:
mintty 2019-05-22 00:00:00 +02:00
parent 336db2f19b
commit 1b41dfa1e0

View File

@ -221,7 +221,12 @@ config () {
if [ "$name" = "WSL" ]
then
#cmd /C copy "$name Terminal.lnk" "%USERPROFILE%\\Desktop"
cmd /C copy "$name Terminal.lnk" "%APPDATA%\\..\\Desktop\\"
#cmd /C copy "$name Terminal.lnk" "%APPDATA%\\..\\Desktop\\"
# the above does not work reliably (see #166)
# determine actual Desktop folder
desktopkey='\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Desktop'
desktop=`regtool get "$desktopkey"`
cmd /C copy "$name Terminal.lnk" "$desktop\\"
fi
# launch script in ~ -> WSLtty home, WindowsApps launch folder
@ -234,6 +239,10 @@ config () {
fi
}
# ensure proper parameter passing to cmd /C
chcp.com 65001 # just in case; seems to work without as well
# configure for all distros, plus default distro
for guid in `
if $alldistros
then regtool list "$lxss" 2>/dev/null