terminal/src/propslib
Malcolm Smith 601286ac69
Find icon from shortcut target if shortcut doesn't specify it (#6277)
Implements what I was suggesting in #6266 where if a shortcut doesn't
specify an icon, the shortcut target full path is used before searching
for a matching executable in the path.

## References

Found due to not getting the right icon in conhost from the Yori
installer.  It's fixed in the installer from
5af366b6a5
for all current users of conhost though, so this PR is just trying to
minimize surprises for the next guy.

## Detailed Description of the Pull Request / Additional comments

I know conhost and shortcut settings aren't really the team's focus
which is why I'm doing this.  I understand though if there's a better
way or there are factors that I hadn't considered.  Note that the path
searching code is used when programs are launched without using a
shortcut, and it will match if the working directory of the shortcut is
the directory containing the executable.

## Validation Steps Performed

Created a shortcut that didn't specify an icon to a binary that wasn't
in the path, and verified that the icon in the upper left of the console
window could resolve correctly when opening the shortcut.  I'm not aware
of a way to get into this path (of launching via a shortcut to a command
line process) without replacing the system conhost, which is what I did
to verify it.  In order to diagnose it, I used hardcoded DebugBreak()
since even ImageFileExecutionOptions didn't like running against conhost-
is there are better way to debug and test these cases without being so
invasive on the system?

Closes #6266
2020-06-01 17:19:05 +00:00
..
conpropsp.hpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
precomp.cpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
precomp.h Change NULL to nullptr since they are pointers (#4960) 2020-03-20 20:35:12 +00:00
propslib.vcxproj Unify and clean up the common build properties (#3429) 2019-11-05 14:29:11 -08:00
propslib.vcxproj.filters Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
RegistrySerialization.cpp add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
RegistrySerialization.hpp inbox: reflect changes from 20h1 branch (#2310) 2019-08-07 10:58:53 -07:00
ShortcutSerialization.cpp Find icon from shortcut target if shortcut doesn't specify it (#6277) 2020-06-01 17:19:05 +00:00
ShortcutSerialization.hpp Find icon from shortcut target if shortcut doesn't specify it (#6277) 2020-06-01 17:19:05 +00:00
sources Import build fix changes from OS for sync to a34a957cf 2020-03-16 18:26:48 +00:00
TrueTypeFontList.cpp add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
TrueTypeFontList.hpp add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00