winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

InstallerUrl for local directories does not work as expected

Open excelsi opened this issue 10 months ago • 4 comments

Brief description of your issue

I downloaded the VSCode Package locally to a directory with winget download, which downloaded the exe and the yaml manifest. I enabled local manifests with winget settings --enable LocalManifestFiles

Then i changed the InstallerUrl in the manifest from the HTTP URL to either a relative local Path "./Microsoft Visual Studio Code_1.88.0_User_X64_inno_en-US.exe" or a full local path "D:/TEMP/tempdown/Microsoft Visual Studio Code_1.88.0_User_X64_inno_en-US.exe"

after that i try to install the package from the local manifest with winget install --silent --manifest ".\Microsoft Visual Studio Code_1.88.0_User_X64_inno_en-US.yaml" or winget install --silent --manifest "D:\TEMP\tempdown\Microsoft\Microsoft Visual Studio Code_1.88.0_User_X64_inno_en-US.yaml"

In both cases it found the manifest correctly, but failed to install with

InternetOpenUrl() failed.
0x80072ee6 : unknown error

I also tried the InstallerUrl ".\Microsoft Visual Studio Code_1.88.0_User_X64_inno_en-US.exe" or "D:\TEMP\tempdown\Microsoft Visual Studio Code_1.88.0_User_X64_inno_en-US.exe"

Also tried file://D:/TEMP/tempdown/Microsoft Visual Studio Code_1.88.0_User_X64_inno_en-US.exe

Query download request status failed.
0x80072ef2 : unknown error

or file:///D:/TEMP/tempdown/Microsoft Visual Studio Code_1.88.0_User_X64_inno_en-US.exe

InternetOpenUrl() failed.
0x8007007b : The filename, directory name, or volume label syntax is incorrect.

or file:./Microsoft Visual Studio Code_1.88.0_User_X64_inno_en-US.exe

InternetOpenUrl() failed.
0x80072ee6 : unknown error

Steps to reproduce

Tried multiple times and different paths as described.

Expected behavior

It should install the Package from the local path InstallerUrl

Actual behavior

It failes with the mentioned errors.

Environment

PS D:\TEMP\tempdown> winget --info
Windows-Paket-Manager (Vorschau) v1.8.924-preview
Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.

Windows: Windows.Desktop v10.0.22631.3374
Systemarchitektur: X64
Paket: Microsoft.DesktopAppInstaller v1.23.924.0

WinGet-Verzeichnisse
-----------------------------------------------------------------------------------------------------------------------------------------
Protokolle                                   %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
Benutzereinstellungen                        %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Verzeichnis für portierbare Links (Benutzer) %LOCALAPPDATA%\Microsoft\WinGet\Links
Portables Linkverzeichnis (Computer)         C:\Program Files\WinGet\Links
Portierbarer Paketstamm (Benutzer)           %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portierbarer Paketstamm                      C:\Program Files\WinGet\Packages
Portierbares Paketstamm (x86)                C:\Program Files (x86)\WinGet\Packages
Installationsprogrammdownloads               %USERPROFILE%\Downloads

Links
-----------------------------------------------------------------------------------------
Datenschutzerklärung              https://aka.ms/winget-privacy
Lizenzvereinbarung                https://aka.ms/winget-license
Hinweise von Drittanbietern       https://aka.ms/winget-3rdPartyNotice
Startseite                        https://aka.ms/winget
Windows Store-Nutzungsbedingungen https://www.microsoft.com/en-us/storedocs/terms-of-sale

Administratoreinstellung                  Status
-----------------------------------------------------
LocalManifestFiles                        Aktiviert
BypassCertificatePinningForMicrosoftStore Deaktiviert
InstallerHashOverride                     Deaktiviert
LocalArchiveMalwareScanOverride           Deaktiviert
ProxyCommandLineOptions                   Deaktiviert
DefaultProxy                              Deaktiviert

excelsi avatar Apr 07 '24 15:04 excelsi

enableLocalManifests means that you can use winget install --manifest <path-to-local-manifest>, not that InstallerUrl can point to a local file. I don’t believe that pointing a manifest to a locally hosted installer is currently possible

Trenly avatar Apr 08 '24 02:04 Trenly

enableLocalManifests means that you can use winget install --manifest <path-to-local-manifest>, not that InstallerUrl can point to a local file. I don’t believe that pointing a manifest to a locally hosted installer is currently possible.

If InstallerUrl cannot point to a local file imo it would be nice if someone can convert this to a feature request. Thanks!

excelsi avatar Apr 08 '24 03:04 excelsi

Remive me from your list

Get Outlook for Androidhttps://aka.ms/AAb9ysg


Stuntman58 avatar Apr 08 '24 03:04 Stuntman58

I opened an idea for this, so if its no issue you can close this issue here. Thanks!

excelsi avatar Apr 08 '24 18:04 excelsi

Not an Issue will be handled further in the feature Request: https://github.com/microsoft/winget-cli/issues/4361

excelsi avatar Aug 07 '24 14:08 excelsi