Skip to content

Commit

Permalink
determine Desktop folder from registry (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
mintty committed May 22, 2019
1 parent 336db2f commit 1b41dfa
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion config-distros.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 1b41dfa

Please sign in to comment.