Closed farag2 closed 1 year ago
From my perspective of view, something is going wrong here: https://github.com/microsoft/winget-cli/blob/fcce38f532439fc4a7294c246c1eb19d146acea4/src/AppInstallerCommonCore/Filesystem.cpp#L133
I think this is package specific, since I tried with USSF winget install WindowsPostInstallWizard.UniversalSilentSwitchFinder --Location D:\Test\
and it worked fine
@Trenly, WindowsPostInstallWizard has only one exe file in archive. Can it be the reason that its' archive can be expanded? I do not see any differences between SophiApp fundamental structure (probably, at least it has a folder in archive) and the WindowsPostInstallWizard archive.
So, any thoughts how to fix the issue?
I did some local tests. I noticed that if an archive contains any folder, it cannot be extracted. I removed the Bin
folder from the archive and moved all files to the root. and it works perfectly.
Can it be considered as an issue as winget cannot extract archives with folders inside?
@Trenly, @denelon
Did additional tests. So, as a summary
root folder with files and folders inside
with --location "D:\test"
. But successfully installs without --location "D:\test"
.PS C:\Users\Sanctuary\Desktop> winget install --manifest C:\Users\Sanctuary\Desktop\t\test1\test1\1 --location "D:\test"
Found SophiApp [test1.test1] Version 1
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Successfully verified installer hash
Extracting archive...
Successfully extracted archive
Starting package install...
An unexpected error occurred while executing the command:
copy_file: �������� � �������.: "C:\Users\SANCTU~1\AppData\Local\Temp\WinGet\test1.test1.1\extracted\SophiApp", "D:\test\SophiApp"
Portable install failed; Cleaning up...
PS C:\Users\Sanctuary\Desktop>
root folder with files only
inside with --location "D:\test"
. Also failed to install without --location "D:\test"
.PS C:\Users\Sanctuary\Desktop> winget install --manifest C:\Users\Sanctuary\Desktop\t\test2\test2\2 --location "D:\test"
Found SophiApp [test2.test2] Version 2
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Successfully verified installer hash
Extracting archive...
Successfully extracted archive
Starting package install...
An unexpected error occurred while executing the command:
copy_file: �������� � �������.: "C:\Users\SANCTU~1\AppData\Local\Temp\WinGet\test2.test2.2\extracted\SophiApp", "D:\test\SophiApp"
Portable install failed; Cleaning up...
PS C:\Users\Sanctuary\Desktop>
NO root folder with files and folders
inside with --location "D:\test"
. But successfully installs without --location "D:\test"
.PS C:\Users\Sanctuary\Desktop> winget install --manifest C:\Users\Sanctuary\Desktop\t\test3\test3\3 --location "D:\test"
Found sophiapp [test3.test3] Version 3
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Successfully verified installer hash
Extracting archive...
Successfully extracted archive
Starting package install...
An unexpected error occurred while executing the command:
copy_file: �������� � �������.: "C:\Users\SANCTU~1\AppData\Local\Temp\WinGet\test3.test3.3\extracted\Bin", "D:\test\Bin"
Portable install failed; Cleaning up...
PS C:\Users\Sanctuary\Desktop>
NO root folder with files only
inside with --location "D:\test"
.PS C:\Users\Sanctuary\Desktop> winget install --manifest C:\Users\Sanctuary\Desktop\t\test4\test4\4 --location "D:\test"
Found sophiapp [test4.test4] Version 4
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/Sophia-Community/SophiApp/releases/download/1.0.87/4.zip
██████████████████████████████ 577 KB / 577 KB
Successfully verified installer hash
Extracting archive...
Successfully extracted archive
Starting package install...
Command line alias added: "sophiapp"
Successfully installed
PS C:\Users\Sanctuary\Desktop>
@Trenly, @denelon, @ryfu-msft
@farag2 Thanks for the detailed analysis!
I found the issue still.
My version is the latest
C:\Windows\System32>winget -v
v1.4.11071
my setting file:
"portablePackageUserRoot": "D:/Users/****/Packages",
"portablePackageMachineRoot": "D:/Program Files/Packages/Portable"
and now I cannot install anything with print which is the same as farag2
@Maicarons It works in https://github.com/microsoft/winget-cli/releases/tag/v1.5.1081-preview Waiting for 1.5 release :cat:
Brief description of your issue
I want to determine another folder on D drive to extract a portable software, but no matter how I use
--location
, it fails.Steps to reproduce
Expected behavior
The ZIP archive should be extracted without errors.
Actual behavior
I receive
An unexpected error occurred while executing the command: copy_file: �������� � �������.: "C:\Users\SANCTU~1\AppData\Local\Temp\WinGet\TeamSophia.SophiApp.1.0.94\extracted\SophiApp", "D:\test\SophiApp"
Also, tested with admin rights and as a user. The behavior is the same.
Environment