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

How can I use UpdateManager.CreateShortcutsForExecutable with onlyUpdate = true #1050

Open
shimika opened this issue Jun 7, 2017 · 2 comments
Labels
bug:needs-more-information Issues that need more information from the submitter to understand or reproduce the problem

Comments

@shimika
Copy link

shimika commented Jun 7, 2017

I want to approach onlyUpdate to true by call update.exe but it seems no method.

There is only

mgr.CreateShortcutsForExecutable(exeName, locations ?? defaultLocations, false, processStartArgs, icon);

maybe

@Thieum
Copy link
Contributor

Thieum commented May 2, 2019

@shimika There is a comment in the code explaining the behavior of this flag when used with CreateShortcutsForExecutable:

// NB: If we've already installed the app, but the shortcut

                    // NB: If we've already installed the app, but the shortcut
                    // is no longer there, we have to assume that the user didn't
                    // want it there and explicitly deleted it, so we shouldn't
                    // annoy them by recreating it.

Does it clarify the intent of this flag?

@shiftkey shiftkey added the bug:needs-more-information Issues that need more information from the submitter to understand or reproduce the problem label May 3, 2019
@vidia
Copy link

vidia commented Oct 14, 2020

I have a similar desire as the OP here.

I'm trying to update the shortcuts for a project installed by squirrel, and I'd like to leverage this option for CreateShortcutsForExecutable to only update the shortcuts (so we don't end up recreating shortcuts after the user has deleted them). Currently we execute squirrel with --createShortcut= to generate the shortcuts in the start menu and desktop. Unfortunately though without making additional changes, this means we end up recreating the shortcuts even if a user deletes them.

Would it be reasonable to expose this option under the --createShortcut= flag somehow? Possible as an additional flag --only-update following it? I'd like to avoid recreating the same logic in my own update code if I can build on what already exists in squirrel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:needs-more-information Issues that need more information from the submitter to understand or reproduce the problem
Projects
None yet
Development

No branches or pull requests

4 participants