Skip to content

Unable to save shortcut  #3489

Closed
Closed
@DancingQuanta

Description

@DancingQuanta

I am having issues installing scoop apps on a windows 7 PC at a place of employment.
However my PC was set up in a weird way with respect to the networked drives.
As a result this prevented scoop from installing shortcuts to Start Menu because Start Menu is located on a networked drive in my user domain and this operation used badly formatted path for shortcuts. As far as I can tell the programs always installs on the local drive.

For an example of installing git

PS C:\Users\at17> scoop install git
Scoop uses Git to update itself. Run 'scoop install git' and try again.
Installing '7zip' (19.00) [64bit]
7z1900-x64.msi (1.7 MB) [=====================================================================================] 100%
Checking hash of 7z1900-x64.msi ... ok.
Extracting 7z1900-x64.msi ... done.
Linking ~\scoop\apps\7zip\current => ~\scoop\apps\7zip\19.00
Creating shim for '7z'.
ForEach-Object : Unable to save shortcut
"C:\Users\at17\Microsoft.PowerShell.Core\FileSystem::\fpsvr2\users7$\at17\Start Menu\Programs\Scoop Apps\7-Zip.lnk".
At C:\Users\at17\scoop\apps\scoop\current\lib\shortcuts.ps1:4 char:50
+     $shortcuts | Where-Object { $_ -ne $null } | ForEach-Object {
+                                                  ~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [ForEach-Object], FileNotFoundException
    + FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ForEachObjectCommand

My Start Menu is located in a networked drive that should begin with \\fpsvr2 however the error shows that \fpsvr2 was used instead. This path configuration is called UNC.

I am able to navigate to the Start Menu

PS C:\Users\at17> cd \\fpsvr2\users7$\at17\"Start Menu"\Programs
PS Microsoft.PowerShell.Core\FileSystem::\\fpsvr2\users7$\at17\Start Menu\Programs>

You can see in the destination directory that Microsoft.PowerShell.Core\FileSystem precludes the UNC path as shown in the error above.

Proposed solutions;

  • Move Start Menu - I need to ask my IT dept to do this and there is no guarantee this will happen.
  • Fix UNC path handling. The dropping of backslash needs to be fixed.
  • Option to ignore making shortcuts in Start Menu. I have no idea how important is Start Menu to operation of scoop. But this is a user facing feature and I have little use for this.

Activity

added a commit that references this issue on Jul 16, 2021
dwettstein

dwettstein commented on Sep 28, 2021

@dwettstein

Additionally, when this happens Scoop marks the app as git *failed* and you need to force update or uninstall afterwards.
IMO, Scoop should not mark them as failed just because creating the shortcut failed. The app itself is installed and working properly.

@Ash258, as an idea, maybe this is something you could fix in your fork https://github.com/Ash258/Scoop-Core?

dwettstein

dwettstein commented on Jan 7, 2022

@dwettstein

Hey @rashil2000. Why have you closed that issue, has it been fixed recently?

rashil2000

rashil2000 commented on Jan 7, 2022

@rashil2000
Member

Closed by mistake, I apologize. I had too many tabs open, must have mixed up...

dwettstein

dwettstein commented on Jan 7, 2022

@dwettstein

Closed by mistake, I apologize. I had too many tabs open, must have mixed up...

No worries, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Unable to save shortcut · Issue #3489 · ScoopInstaller/Scoop