microsoft / microsoft/winget-cli

Add commandline parameter to set temp directory

Open
#4,989 9 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Feature
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing winget's command-line argument parsing for install commands and how the installer or download pipeline selects its temporary directory. Confirm the existing tests around install arguments and temporary paths, then define completion as accepting the proposed --temp-path value and using it for the requested installation flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.