-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Brief description of your issue
This issue is a followup on my PR for a package mainfest.
There seem to be a lot of inconsistencyes on how to set the install location path for msi packages. The code currently sets the TARGETDIR
option.
{InstallerSwitchType::InstallLocation, ManifestInstaller::string_t("TARGETDIR=\"" + std::string(ARG_TOKEN_INSTALLPATH) + "\"")} |
This is only one of two available options (see here) and some packages seem to require the alternative INSTALLDIR
option.
I have tested the packages Oracle.JDK.17
, StrawberryPerl.StrawberryPerl
and ChristianHohnstadt.xca
, which all currently don't work with the -l
switch.
In contrast to that, the Borvid.HttpMasterExpress
package works absoloutly fine as is.
One possible soloution would be to allways pass both of these options, which worked in my short testing.
Steps to reproduce
Use one of the following commands:
winget install Oracle.JDK.17 -l C:\ProgStuff\jdk
winget install Oracle.JDK.17 -l "C:\ProgStuff\jdk"
winget install Oracle.JDK.17 --override "/passive TARGETDIR=C:\ProgStuff\jdk"
The jdk is now installed into C:\Program Files\Java\jdk17
and NOT into the given location.
Only winget install Oracle.JDK.17 --override "/passive INSTALLDIR=C:\ProgStuff\jdk"
works as expected.
Expected behavior
The package should be installed into the given Path.
Actual behavior
The given directory is ignored and the package is installed into the default directory.
Environment
[winget --info]
Windows Package Manager v1.1.13405
Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.
Windows: Windows.Desktop v10.0.19043.1415
Paket: Microsoft.DesktopAppInstaller v1.16.13405.0
Protokolle: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir