Squirrel.Windows icon indicating copy to clipboard operation
Squirrel.Windows copied to clipboard

Shortcuts (both desktop and start) are not created on some computers.

Open molster opened this issue 8 years ago • 14 comments

So we have tested this on well over 20 computers (Windows 7, 8, 8.1, and 10), and it seems to work fine on all our test comps. However at least 10 reports from users say after they install it (ranging from any of the windows version said above), they have no idea where to find the app.

Turns out, it was creating no shortcuts for them of any kind. What would prevent Squirrel from making shortcuts for a user?

molster avatar Dec 01 '15 17:12 molster

Antivirus often will mess with setup and prevent hooks from running - are you signing your executable?

anaisbetts avatar Dec 01 '15 18:12 anaisbetts

yeah, we are signing both of the exes in our project. Honestly antivirus did not enter my mind, figured if it allows for the install, it wouldn't be preventing the shortcuts.

If an antivirus is blocking the hooks for shortcuts, would this not show up on their Squirrel install logs?

molster avatar Dec 01 '15 18:12 molster

@molster It might, AV does all manner of hacky random things. Look for "Unauthorized Access"

anaisbetts avatar Dec 02 '15 19:12 anaisbetts

alright, was able to get a user with a log, i'm seeing

2015-12-06 22:06:34> ApplyReleasesImpl: Squirrel Enabled Apps: [C:\Users\Administrator\AppData\Local\Innkeeper\app-0.1.11\Innkeeper.exe]
2015-12-06 22:06:50> ApplyReleasesImpl: Couldn't run Squirrel hook, continuing: C:\Users\Administrator\AppData\Local\Innkeeper\app-0.1.11\Innkeeper.exe: System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at Squirrel.Utility.<>c__DisplayClassf.<InvokeProcessAsync>b__e()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.<InvokeProcessAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.UpdateManager.ApplyReleasesImpl.<>c__DisplayClassdd.<<invokePostInstall>b__d1>d__df.MoveNext()
2015-12-06 22:06:51> ApplyReleasesImpl: Starting fixPinnedExecutables
2015-12-06 22:06:51> ApplyReleasesImpl: fixPinnedExecutables: oldAppDirectories is empty, this is pointless
2015-12-06 22:06:51> ApplyReleasesImpl: Fixing up tray icons

would this fall in line with just an AV issue? if so, will be fun to figure out how to work around it.

molster avatar Dec 07 '15 20:12 molster

This means that your application didn't return in time or crashed or generally did something silly. Try running the hook yourself by-hand and see if it works (i.e. just run Innkeeper --squirrel-updated a.new.version.number)

anaisbetts avatar Dec 07 '15 20:12 anaisbetts

Thanks for the reply,

The above does not happen on any of our test comps, so ill have the user give it a try if I can get a hold of him. Thanks!

molster avatar Dec 07 '15 20:12 molster

I was able to reproduce this issue on three different Win10 machines. Any possible fixes?

Jaykah avatar Jan 05 '16 08:01 Jaykah

Jaykah, does your error log look similar to mine? Also what results do you get from what paulcbetts suggests? I wasn't able to get a user on my project to get back to me

molster avatar Jan 05 '16 08:01 molster

@molster yesm the same error message (Couldn't run Squirrel hook, continuing). Running appname --squirrel-updated a.new.version.number did not help.

Jaykah avatar Jan 06 '16 00:01 Jaykah

I have same issue.

Shortcuts (both desktop and start) are not created

2018-04-07 09:58:42> ApplyReleasesImpl: Couldn't run Squirrel hook, continuing:

AkioUnity avatar Apr 07 '18 17:04 AkioUnity

@molster @Jaykah @AkioUnity is it an issue you are still experiencing with the latest version of Squirrel?

Thieum avatar May 06 '19 21:05 Thieum

@Thieum still exist. v 22.2.0

zdQAQ avatar Jul 08 '20 09:07 zdQAQ

I'm having this problem with 2.0.1. I get the "Couldn't run Squirrel hook" in the log. I have found that when I run setup.exe a second time that the shortcuts are created. That may be a clue to why it fails on the first run if something isn't in place during the first execution, but exists where expected or needed on the second execution.

jmorrelles avatar Oct 22 '20 20:10 jmorrelles

After trying for a while to figure out why --squirrel-install isn't being called for me, I got it to work by creating shortcuts and registry entries on --squirrel-firstrun. I haven't noticed any issues with doing this, but searching around, I haven't found anyone else who is doing this.

If anyone knows why I shouldn't be making shortcuts on --squirrel-firstrun, please let me know and save me from myself 😬 🙃 .

(Launching my app manually with --squirrel-install creates shortcuts, but the installer doesn't launch it with that flag. It does launch my app with --squirrel-firstrun though, which is why I'm hooking into that as a last resort).

benjaffe avatar Mar 26 '21 16:03 benjaffe