Browser-laptop: Stop recreating shortcut on my desktop after every update

Created on 26 Mar 2016  路  20Comments  路  Source: brave/browser-laptop

Every time Brave has an update the shortcut to Brave returns on my desktop. Maybe Brave should check, not with clean install though, that if the shortcut to Brave doesn't exist it should not be created?

I like to keep my Windows desktop nice and clean.

OWindows Qtest-plan-specified installation suggestion

All 20 comments

Agreed. Having the desktop shortcut recreate itself every time is quite annoying. It's certainly not the most pressing of issues, but it will be greatly appreciated when fixed.

This is only testable via an auto-update on Windows. Will need to defer testing until binary up on updater dyno.

Re-opened for more testing

Testing is going to be quite complex. We need to make sure that the following all work correctly:

a) New installations should have a shortcut created on the desktop pointing to the most recent version
b) Updates with a shortcut on the desktop should modify the shortcut to point to the new version
c) Updates without a shortcut on the desktop should not recreate the shortcut

In the b) scenario you should see a line like the following in the SquirrelSetup.log file

2016-09-23 16:03:41> ApplyReleasesImpl: Wanted to update shortcut C:\Users\Aubrey\Desktop\Brave.lnk but it appears user deleted it

Testing steps for a)

Install Brave on either an existing or new installation

Ensure:

Shortcut on desktop is created and has a line like C:\Users\Aubrey\AppData\Local\brave\app-0.12.2 in the Start In: field

Testing steps for b)

  1. Install Brave
  2. Copy c:\users\[username]\AppData\Local\Brave\app-0.12.2 to c:\users\[username]\AppData\Local\Brave\app-0.12.1
  3. Edit shortcut on desktop and change Start In: to point to app-0.12.1 [press Ok to close]
  4. In c:\users\[username]\AppData\Local\Brave run .\app-0.12.2\Brave.exe --squirrel-updated

Ensure

Shortcut on desktop is modified and has line like C:\Users\Aubrey\AppData\Local\brave\app-0.12.2 in the Start In: field

Testing steps for c)

  1. Install Brave
  2. Delete desktop Brave shortcut
  3. In c:\users\[username]\AppData\Local\Brave run .\app-0.12.2\Brave.exe --squirrel-updated

Ensure

Desktop icon is NOT recreated and the following line appears in SquirrelSetup.log

2016-09-23 16:03:41> ApplyReleasesImpl: Wanted to update shortcut C:\Users\Aubrey\Desktop\Brave.lnk but it appears user deleted it

Bonus testing step

  1. run .\app-0.12.2\Brave.exe --squirrel-install

Ensure

Desktop icon is created and points to the correct version

Marking as closed since it is done but please note the label to manually test this in depth @alexwykoff

Testing steps for c)
Install Brave
Delete desktop Brave shortcut
In c:\users[username]\AppData\Local\Brave run .app-0.12.2\Brave.exe --squirrel-updated

Deleting the existing shortcut and then manually running the setup to upgrade Brave to next version still creates a shortcut on Desktop. (Windows 10 x64)

To clarify on part C, per @aekeus :
A shortcut SHOULD be created on a clean install.
A shortcut SHOULD NOT be created on an auto-update.

@alexwykoff your comment is correct. Deleted shortcuts should not be re-created on an auto-update.

Deleted shortcuts will be created if the main installer is run, regardless of installation status.

screen shot 2016-09-29 at 8 47 32 pm

Updates the shortcut as expected.

This seems to be the issue:

https://github.com/brave/browser-laptop/blob/master/app/windowsInit.js#L48

The call is intercepted and forwarded to braveDefaults.exe instead of being handled directly by Brave.exe

talked to you about the above, just tacking here in case anyone else is following along. BraveDefaults.exe is just the nsis script which sets defaults so it shouldn't cause something to be wrong with the icon like the start in folder not being updated. It is also called from the uninstaller to do cleanup.

would like to get this in after preview-1 @aekeus

Was this page helpful?
0 / 5 - 0 ratings