WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
Originally posted by **tristanbarcelon** November 18, 2024
When using winget cli to install packages, it is possible to use the custom, scope or location parameters to provide custom installation parameters or instruct winget cli to pick a properly scoped installer or confine the application installation to a specific folder. Such overrides are useful for applications that consume a lot of disk space over time, such as Visual Studio or SQL Server. [SQLServerDSC exposes multiple parameters for install folders](https://github.com/dsccommunity/SqlServerDsc/blob/85ea1eda6a2d3c3bacd096983d55c99b75dba914/source/Examples/Resources/SqlSetup/8-InstallDefaultInstanceSingleServer2022OrLater.ps1#L69-L77) while VisualStudio does not. It would be helpful if I could use Custom parameter to specify --installPath with a different value from default to prevent system drive from running out of space.
If I wanted to install machine scoped versions of PowerToys or VisualStudioCode, how can I achieve them using Microsoft.Winget.DSC/WingetPackage resource in order to specify machine scope?
Discussed in https://github.com/microsoft/winget-cli/discussions/4985