Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define Download Directory #1208

Open
michha opened this issue Jun 23, 2021 · 17 comments
Open

Define Download Directory #1208

michha opened this issue Jun 23, 2021 · 17 comments
Labels
Area-Settings Issue related to WinGet Settings Issue-Feature This is a feature request for the Windows Package Manager client.

Comments

@michha
Copy link

michha commented Jun 23, 2021

Brief description of your issue

  • our company has AppLocker enabled with an allow-list of directories that executables can be started
  • when installing a package (like Git.Git) it results in the following error (manually translated into english)

Installer-Hash successfully validated
Package installation is going to start...
Unexpected error during execution of command:
0x8007029c : An assert error has occured.

  • the applocker event log states

The execution from %OSDRIVE%\USERS\SOMEUSER\APPDATA\LOCAL\PACKAGES\MICROSOFT.DESKTOPAPPINSTALLER_8WEKYB3D8BBW E\TEMPSTATE\WINGET\GIT.GIT.2.32.0.EXE was blocked.

Expected behavior

We should be able to set the package directory where the packages are downloaded and executed.
A option within winget settings should be added to override the default location.

Actual behavior

With AppLocker enabled, we can not use winget, because executables cannot be run inside the users profile path.

Environment

Windows Package Manager v1.0.11451
Windows: Windows.Desktop v10.0.19042.1052
Paket: Microsoft.DesktopAppInstaller v1.11.11451.0
@ghost ghost added the Needs-Triage Issue need to be triaged label Jun 23, 2021
@denelon
Copy link
Contributor

denelon commented Jun 23, 2021

We have a change coming in the next release to change the download location to %TEMP% #1146.

@denelon denelon added Issue-Feature This is a feature request for the Windows Package Manager client. and removed Needs-Triage Issue need to be triaged labels Jun 23, 2021
@denelon denelon added this to the Backlog - Windows Package Manager milestone Jun 23, 2021
@denelon
Copy link
Contributor

denelon commented Jun 23, 2021

This looks like it might be the same thing as #970.

@michha
Copy link
Author

michha commented Jun 23, 2021

We have a change coming in the next release to change the download location to %TEMP% #1146.

This would not help us as the temp directory is the main directory for malicious scripts and programs and therefore also blocked by AppLocker.

Like I said, everyone with AppLocker needs a configuration option for the path from which the exe, msi and so on will be started.

@denelon

This comment has been minimized.

@denelon

This comment has been minimized.

@denelon denelon marked this as a duplicate of #970 Jun 23, 2021
@ghost

This comment has been minimized.

@ghost ghost closed this as completed Jun 23, 2021
@ghost ghost added the Resolution-Duplicate Issue is a duplicate label Jun 23, 2021
@paalders
Copy link

paalders commented Aug 4, 2021

@denelon I stubled across this issue as well. In my opinion this is not the same as #970. This issue is about the temp folder that is used by winget to download and run the installer. #970 is about the target directory of the software to be installed into. Both of these locations are blocked by AppLocker software, since all of them base in %LOCALAPPDATA%. The applications are installed in \Programs\ and the installer is run from \Temp.

As a target install directory I can image people might want to install into the C:\Program Files\ folder, or something else. This location a user will not want to use for the temporary data stored by winget during installation, which this issue is about. I can image that you'd might to set this folder to C:\Temp\ or something different.

@denelon
Copy link
Contributor

denelon commented Aug 4, 2021

@paalders I'll discuss this with the team. If there aren't any major blocking reasons associated with a user specified location, I'll re-open the Issue and mark the appropriate comments "No longer applicable". If not, I'll share the reasons so we can look for alternative solutions. One of the benefits we might lose is the ability to use the "Disk Cleanup" behavior associated with "Temporary Files".

@denelon
Copy link
Contributor

denelon commented Aug 4, 2021

We still have some concerns regarding long path names, but it looks like this is a different ask than what I initially understood.

@denelon denelon reopened this Aug 4, 2021
@denelon denelon removed the Resolution-Duplicate Issue is a duplicate label Aug 4, 2021
@michha
Copy link
Author

michha commented Jan 10, 2022

@denelon Whats the status about this issue. We are still struggling with winget because we cannot set the temporary folder for the package content.

@denelon
Copy link
Contributor

denelon commented Jan 10, 2022

We will be tackling standalone .exe and .zip packages in 1.3. I'm highly expecting we will be looking at how we handle paths for those types of packages. It will likely make sense to bring this in with that effort. We will also need to include the information via winget --info as logs from some installers tend to get placed in the directory the installer runs from.

@denelon
Copy link
Contributor

denelon commented Jun 10, 2022

@michha this didn't make the cut for 1.3, and .zip will be moved to 1.4 as well. I'll put this into the 1.4 milestone to see if the team can fit this in.

@denelon denelon modified the milestones: Backlog-Client, v1.4-Client Jun 10, 2022
@denelon denelon modified the milestones: v1.4-Client, v.Next-Client Jan 5, 2023
@bpe71
Copy link

bpe71 commented Jan 7, 2023

This didn't make it in v1.4?

@denelon
Copy link
Contributor

denelon commented Jan 9, 2023

Sadly, no. We did get .zip support included in 1.4, but there wasn't enough time to look at supporting alternate paths for where we download and run installers from.

@michha
Copy link
Author

michha commented Mar 3, 2023

In the latest 1.5 preview I couldnt find any reference to this issue.
Will there be a fix for this issue in 1.5?

We really need an environment variable to give winget a hint for the temporary folder it should use.

@denelon
Copy link
Contributor

denelon commented Mar 3, 2023

@michha take a look at the Roadmap to see how we generally prioritize work. This Issue simply doesn't have enough "demand" yet to move up very high in the backlog. I've moved it into the v.next milestone rather than the backlog to see if there is more interest or need for this work.

@denelon denelon changed the title AppLocker prevents package installation Define Download Directory May 4, 2023
@Trenly
Copy link
Contributor

Trenly commented Jun 16, 2023

[Policy] Area-Settings

@microsoft-github-policy-service microsoft-github-policy-service bot added the Area-Settings Issue related to WinGet Settings label Jun 16, 2023
@denelon denelon removed this from the v.Next-Client milestone Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issue related to WinGet Settings Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
None yet
Development

No branches or pull requests

5 participants