bayleeadamoss / zazu-file-finder

A file finder for Zazu.
18 stars 11 forks source link

Use windows shortcuts instead of executables #23

Closed PAB-me-uk closed 7 years ago

PAB-me-uk commented 7 years ago

In Windows it is normal to launch apps via shortcuts (.lnk) that reside in the users desktop or the start menu rather than the executable files (.exe) that reside in the program files directories.

The program files directories contain many executable's that are not suitable for end user launching.

Also many apps should always be launched via their shortcuts which often require arguments and a configured working directory.

For and example the Atom editor has the following in its shortcut:

C:\Program Files\Atom\Update.exe --processStart atom.exe

This triggers an update check for Atom at every launch, running atom.exe directly would bypass the update checks.

This change is to enumerate .lnk files in the following directories: %USERPROFILE%\Desktop %APPDATA%\Microsoft\Windows\Start Menu\Programs %ProgramData%\Microsoft\Windows\Start Menu\Programs

I have confirmed these directories are correct for Windows 7, 8 & 10.

bayleedev commented 7 years ago

This worked great in my VM's. Thanks for the contribution!