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

Created shortcut not working, wrong target #169

Closed
Sanderttt opened this issue Apr 18, 2017 · 9 comments
Closed

Created shortcut not working, wrong target #169

Sanderttt opened this issue Apr 18, 2017 · 9 comments

Comments

@Sanderttt
Copy link

Sanderttt commented Apr 18, 2017

The created shortcut to my electron app is not working because it's pointing to the wrong directory

Properties of the desktop shortcut:
Target: C:\Users\Win10H64\AppData\Local{app_name}}\dist.exe
Start in: C:\Users\Win10H64\AppData\Local{app_name}}\app-0.0.1
The dir where the exe resides: C:\Users\Win10H64\AppData\Local{{app_name}}\app-0.0.1\dist.exe

I'm using the following:
electron: 1.4.15
electron-packager: 8.5.1
electron-winstaller: 2.5.2
electron-squirrel-startup: 1.0.0

Any help would be appreciated

@Sanderttt
Copy link
Author

Sanderttt commented Apr 18, 2017

from SquirrelSetup.log:
2017-04-18 17:39:33> ApplyReleasesImpl: About to save shortcut: C:\Users\Win10H64\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\{app_name}}\{app_name}}.lnk (target C:\Users\Win10H64\AppData\Local\{app_name}}\dist.exe, workingDir C:\Users\Win10H64\AppData\Local\{app_name}}\app-0.0.1, args , toastActivatorCSLID 6c1df75b-1070-5d73-b55f-1a9aeb0436d6) 2017-04-18 17:39:33> ApplyReleasesImpl: Creating shortcut for dist.exe => C:\Users\Win10H64\Desktop\{app_name}}.lnk 2017-04-18 17:39:33> ApplyReleasesImpl: About to save shortcut: C:\Users\Win10H64\Desktop\{app_name}}.lnk (target C:\Users\Win10H64\AppData\Local\{app_name}}\dist.exe, workingDir C:\Users\Win10H64\AppData\Local\{app_name}}\app-0.0.1, args , toastActivatorCSLID 6c1df75b-1070-5d73-b55f-1a9aeb0436d6)

@tobiasWenger
Copy link

I can confirm this issue.

@Sanderttt
Copy link
Author

I'm going to try 2 things:

  1. Use another Update.exe version
  2. Create a vbs file that changes the shortcut and call it within the squirrel events

@Sanderttt
Copy link
Author

I fixed it. It was a problem in my code.

changed:
const exeName = 'dist.exe'; spawnUpdate(['--createShortcut', exeName]);

to:
const exeName = path.resolve(path.join(rootAtomFolder,'app-'+package.version+'/dist.exe')); spawnUpdate(['--createShortcut', exeName]);

@reidmweber
Copy link

I'm having this issue, too. I've tried putting the app version in the exeName but that didn't fix it.

@reidmweber
Copy link

I finally got it to work. My issue was that my package.version was
4.0.1-beta.1
, but the app folder that gets created is
app-4.0.1-beta1
Notice the missing . between beta and 1.
I just removed the beta.1 for now. Not sure if this is a bug in how Squirrel handles versions

@whitmer
Copy link

whitmer commented Sep 9, 2017

Similar issue, my app directory is "app-17.09.07", and the shortcut that is created is to "AppData\Local\App\app.exe" which starts and then dies. However, if I rename the folder to "app-17.9.7" and update the shortcut's starting directory to match, then everything works swimmingly.

@boid-com
Copy link

boid-com commented Apr 6, 2018

Hello, can someone explain a possible solution in more detail. I've done everything mentioned in this thread and still have the same issue more details posted here:

electron-userland/electron-builder#2775

@LeonardoRick
Copy link

@Sanderttt could you please share with us the value of your rootAtomFolder ?

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

No branches or pull requests

6 participants