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

Add commandline parameter to set temp directory #4989

Open
alie2n opened this issue Nov 19, 2024 · 3 comments
Open

Add commandline parameter to set temp directory #4989

alie2n opened this issue Nov 19, 2024 · 3 comments
Labels
Issue-Feature This is a feature request for the Windows Package Manager client.

Comments

@alie2n
Copy link

alie2n commented Nov 19, 2024

Description of the new feature / enhancement

Hi,
in my environment we use WithSecure with a bunch of anti ransomware rules. One of these rules is to prevent rare files with unknown reputation to be run from the default temp path.
In my case I tried to install "Microsoft SQL Management Studio" or Git, which were blocked during the installation.
I can define exceptions based on the sha256 hash of the installers, but it would be easier to be able to define an alternate temp path to be used.

Proposed technical implementation details

I'd like to be able to call winget like this:
winget --temp-path c:\temp install Git.Git

@alie2n alie2n added the Issue-Feature This is a feature request for the Windows Package Manager client. label Nov 19, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Nov 19, 2024
@alie2n
Copy link
Author

alie2n commented Nov 19, 2024

I'd like to be able to call winget like this:
winget --temp-path c:\temp install Git.Git
this would download the installer file to C:\temp and execute from there. To prevent overwriting existing files this command could of course create a temporary directory like C:\temp\winget. and put the downloaded file there and remove the folder after the operation.

@Trenly
Copy link
Contributor

Trenly commented Nov 19, 2024

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Triage Issue need to be triaged label Nov 19, 2024
@whindsaks
Copy link

So you want to work around flaws in your security system by changing unrelated tools? Why is %temp% any less secure than any other place a non-admin user can write?

In your terminal, just do

Set tmp=%localappdata%
Winget ....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
None yet
Development

No branches or pull requests

3 participants