Scoop: After the windows 10 updates, all shortcuts of scoop will disappear.

Created on 25 Apr 2020  ·  14Comments  ·  Source: lukesampson/scoop

  1. Scoop creates shortcuts into %APPDATA%\Microsoft\Windows\Start Menu\Programs\Scoop Apps;
  2. After windows 10 updates, all shortcuts in that folder will disappear.

This might be a bug of scoop? Or it's a bug of Windows but we have to work around this.

PS. My windows 10 is an Insiders Preview version that updates every week, so my shortcuts disappear every week and I can't find ways to restore them expect backing up them manually.

Most helpful comment

@h404bi Thanks and scoop reset command works.

So we should type and execute this command every time after the Windows 10 updates? I'm an Insider Preview user so I must type this command every week to keep scoop shortcuts alive.

scoop reset *
  1. I'm interested in the critical reason why the shortcuts will disappear.
  2. I think this issue should not be fixed manually but be fixed automatically.

All 14 comments

@h404bi Thanks and scoop reset command works.

So we should type and execute this command every time after the Windows 10 updates? I'm an Insider Preview user so I must type this command every week to keep scoop shortcuts alive.

scoop reset *
  1. I'm interested in the critical reason why the shortcuts will disappear.
  2. I think this issue should not be fixed manually but be fixed automatically.

I'm doing a test on whether the Junction Point is the key reason that Windows will delete the shortcuts.

image

As the image shows above, I've made a test folder in the %USERPROFILE% folder and a current Junction Point targeting a neighbor folder. The shortcut targets the text file in the Junction Point folder.

Wait for the Insider's update next week, and I'll find that whether if it is a Windows shortcut bug.

A whole week passed with an Insider's update restart, and I've got the answer:

The shortcut will disappear when the shortcut is linked to a file that is in a Junction Point.

This is the screenshot after the Windows Update, comparing to the one 6 days ago which is posted above.

image

So this issue can be closed as I'll report this issue as a Windows Bug.

@walterlv Thank you for your investigations and reports, which are really helpful.

Will the problem persist if symbolic link is used instead of junction when linking current?

@archit9169 I'll do another test for that and thanks for your suggestion.

image

And now, I've created two shortcuts for a controlled experiment. What we need to do is to wait for the next Insider's Update next week.

@archit9169 I'll do another test for that and thanks for your suggestion.

image

And now, I've created two shortcuts for a controlled experiment. What we need to do is to wait for the next Insider's Update next week.

I have a solution for this problem. I already mentioned that in one other discussion. We can just simply move the shortcuts folder from $WINDIR to $SCOOPDIR and then create a symlink or junction to that folder.

Since windows updates removes shortcuts which refer to a location inside a junction, this will keep the shortcuts safe. In an event like the windows update erasing the shortcuts folder instead, we can simply modify [scoop update scoop] which at the moment does nothing to re-create the shortcut symlink or junction.

image

OK, the new test is done!

  • The shortcuts in the start menu linking files in the junction points are lost.
  • The shortcuts in the start menu linking files in the symbol link persist.
  • The shortcuts outside the start menu (D: etc.) are all persist no matter what types they are linking.

What we need to resolve is that the symbol link wants to run as Administrator.

@archit9169 Maybe your suggestion that we move the shortcuts outside of the start menu folder can solve this issue.

It means that I'll do another test to make the Scoop Apps folder in the start menu as a Junction Point which links to a shortcuts folder in the scoop directory which contains all the shortcuts of the scoop apps.

image

EDIT:

Wait, this test doesn't need to be done at all!

The Scoop Apps Junction Point isn't been recognized by the start menu so none of the shortcuts should be created outside of the start menu.

image

@walterlv yeah you are right, i just checked myself. So the next best solution is using symbolic links instead of junctions.

@archit9169 Unfortunately as I said above, the symbolic links need to run as Administrator but scoop never got this privilege.

@archit9169 Unfortunately as I said above, the symbolic links need to run as Administrator but scoop never got this privilege.

Not with the new updates. mklink /d link target works without admin priv.

Was this page helpful?
0 / 5 - 0 ratings