Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Also look for shortcut in the system Start Menu. #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

agashlin
Copy link
Contributor

@agashlin agashlin commented Dec 5, 2020

With an installer a shortcut is often created in the system Start Menu under %PROGRAMDATA%, this patch looks for an existing shortcut there, to avoid creating a new shortcut in the user's Start Menu under %APPDATA%.

The permission had to change to STGM_READ on persistFile->Load() so the system shortcut can be read, this is all that's needed to read the shortcut, the persistFile->Save() call seems to still work correctly.

I wrote this before looking at PR #52, but it might help in some of those situations as well, though maybe this isn't sufficiently useful to take upstream.

@ChristianGalla
Copy link
Contributor

Thanks tor the PR @agashlin.

If there is a shell link in %PROGRAMDATA% and %APPDATA%, should both shortcuts be checked for correct AUMI before changing the one in %APPDATA%?

Has someone checked what happens if there are multiple shortcuts having the same AUMI?

@agashlin
Copy link
Contributor Author

agashlin commented Dec 7, 2020

If there is a shell link in %PROGRAMDATA% and %APPDATA%, should both shortcuts be checked for correct AUMI before changing the one in %APPDATA%?

Has someone checked what happens if there are multiple shortcuts having the same AUMI?

Hm, that's an interesting question. It's my understanding that having both a system and a user shortcut with the same name will cause the system one to be ignored, as far as showing them in the Start Menu, but I haven't checked if that applies to AUMI as well.

@mohabouje mohabouje force-pushed the master branch 2 times, most recently from 90ea09c to 430364e Compare January 11, 2021 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants