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

Failed to create start menu shortcut for GUI application #4246

Closed
finalwhy opened this issue Jan 30, 2021 · 7 comments
Closed

Failed to create start menu shortcut for GUI application #4246

finalwhy opened this issue Jan 30, 2021 · 7 comments

Comments

@finalwhy
Copy link

finalwhy commented Jan 30, 2021

When I want to install a GUI application by the scoop (for example typora or everything), scoop able to successfully install the application, but can not create a shortcut to the Start menu. The output of scoop is as follows
Flicker_List_Zpla0gYInW

msedge_fnBa2WKT9x
(All shortcuts in the "Scoop Apps" folder are created by myself, including this folder)

@finalwhy finalwhy changed the title Fail to create shortcut for a GUI app Failed to create start menu shortcut for GUI application Jan 30, 2021
@HUMORCE
Copy link
Member

HUMORCE commented Jan 30, 2021

search everything.lnk in Everything, any result?

@finalwhy
Copy link
Author

search everything.lnk in Everything, any result?

no,there is no any .lnk file in everything
explorer_RXBxB8hofY

@HUMORCE
Copy link
Member

HUMORCE commented Jan 30, 2021

I mean use app Everything to search everything.lnk

screenshot_20210130172203

@finalwhy
Copy link
Author

finalwhy commented Jan 30, 2021

I mean use app Everything to search everything.lnk

screenshot_20210130172203

Everthing: uninstall and then install
Flicker_List_POuURQJo9S

Quicklook: new installed
Everything_zxXIjdlxqY

I think it's a problem with powershell core (my powershell core was installed through the Microsoft Store)
I re-install powershell by .msi manually and everything is ok

@HUMORCE
Copy link
Member

HUMORCE commented Jan 30, 2021

remove Scoop Apps folder you created,
run windows powershell (C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe)
exec scoop reset *

scoop can also install pwsh core, but I think there are some problems with the current configuration of the manifest.

other ways to install powershell core:
https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-windows?view=powershell-7.1

I installed pwsh core by dotNet global tool.

If you have joined the windows insider program: #3941

@finalwhy finalwhy closed this as completed Feb 3, 2021
@NamelessUzer
Copy link

After I reinstall the Windows system. First, I install pwsh and Windows Terminal then run this command in it to install scoop.
iwr -useb get.scoop.sh | iex

I found all the shortcut are created in the pwsh folder rather than "%HomePath%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Scoop Apps". The folder also ends with "AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Scoop Apps", this led me to come up with the solution.

I guess scoop was limited to create this folder "%HomePath%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Scoop Apps".

So I uninstall Windows Terminal and pwsh just run scoop reset * in Powershell. then PowerShell tells me that "scripts cannot run on this computer." Then I run this command Set-ExecutionPolicy RemoteSigned to remove this limit. Then, run "scoop reset *"
again. The problem was solved perfectly.

Shortly speaking. To solve this problem, follow these 3 steps.

  1. Uninstall Windows Terminal and pwsh. ( I'm not sure if it's necessary, you can have a try.)
  2. Run Set-ExecutionPolicy RemoteSigned in Powershell.
  3. Run scoop reset * in Powershell.
  4. Reinstall Windows Terminal and pwsh as you wash.

@finalwhy
Copy link
Author

finalwhy commented Feb 5, 2021

After I reinstall the Windows system. First, I install pwsh and Windows Terminal then run this command in it to install scoop.
iwr -useb get.scoop.sh | iex

I found all the shortcut are created in the pwsh folder rather than "%HomePath%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Scoop Apps". The folder also ends with "AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Scoop Apps", this led me to come up with the solution.

I guess scoop was limited to create this folder "%HomePath%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Scoop Apps".

So I uninstall Windows Terminal and pwsh just run scoop reset * in Powershell. then PowerShell tells me that "scripts cannot run on this computer." Then I run this command Set-ExecutionPolicy RemoteSigned to remove this limit. Then, run "scoop reset *"
again. The problem was solved perfectly.

Shortly speaking. To solve this problem, follow these 3 steps.

  1. Uninstall Windows Terminal and pwsh. ( I'm not sure if it's necessary, you can have a try.)
  2. Run Set-ExecutionPolicy RemoteSigned in Powershell.
  3. Run scoop reset * in Powershell.
  4. Reinstall Windows Terminal and pwsh as you wash.

Thanks, I have solved this problem by using the .msi file to reinstall powershell (previously my powershell core was installed through the Microsoft Store). I think the cause of the problem may be some kind of sandbox mechanism in the Microsoft Store. When the powershell installed through the Microsoft Store executes the script, ~ is not pointing to the current user's folder, but to a temporary user folder inside it

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

3 participants