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

After the windows 10 updates, all shortcuts of scoop will disappear. #3941

Closed
walterlv opened this issue Apr 25, 2020 · 18 comments
Closed

After the windows 10 updates, all shortcuts of scoop will disappear. #3941

walterlv opened this issue Apr 25, 2020 · 18 comments

Comments

@walterlv
Copy link

  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.

@chawyehsu
Copy link
Member

Known issue. #2233

@walterlv
Copy link
Author

walterlv commented Apr 25, 2020

@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.

@walterlv
Copy link
Author

walterlv commented Apr 26, 2020

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.

@walterlv
Copy link
Author

walterlv commented May 2, 2020

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.

@chawyehsu
Copy link
Member

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

@archit9169
Copy link

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

@walterlv
Copy link
Author

walterlv commented May 3, 2020

@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
Copy link

archit9169 commented May 3, 2020

@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.

@walterlv
Copy link
Author

walterlv commented May 7, 2020

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.

@walterlv
Copy link
Author

walterlv commented May 7, 2020

@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

@archit9169
Copy link

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

@walterlv
Copy link
Author

walterlv commented May 7, 2020

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

@archit9169
Copy link

@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.

@rmobis
Copy link

rmobis commented Sep 23, 2022

Has this been fixed? All my shortcuts just disappeared and coincidently it was after a Windows Update. I think it was Windows 11, version 22H2 and I'm not sure if that's a recent update, as my machine is only a few days old and it might have been an old update.

@rashil2000
Copy link
Member

We don't know the cause for it yet, but you can quickly fix it by running scoop reset *

@Dormanator
Copy link

I also had this issue with the recent update Windows 11, version 22H2 and running scoop reset * fixes it for some of my apps (i.e., GIMP, MySQLWorkbench) but not all (i.e., IDEA, VS Code).

@SiriosDev
Copy link

some news?

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

7 participants