Description
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 isStart Menu
to operation ofscoop
. But this is a user facing feature and I have little use for this.
Activity
Fix network drive shortcut creation
dwettstein commentedon Sep 28, 2021
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 commentedon Jan 7, 2022
Hey @rashil2000. Why have you closed that issue, has it been fixed recently?
rashil2000 commentedon Jan 7, 2022
Closed by mistake, I apologize. I had too many tabs open, must have mixed up...
dwettstein commentedon Jan 7, 2022
No worries, thanks!