[{"data":1,"prerenderedAt":498},["Reactive",2],{"navigation":3,"/posts/winget-override":204,"/posts/winget-override-surround":473},[4,192,200],{"title":5,"_path":6,"children":7,"icon":191},"Blog","/posts",[8,11,14,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59,62,65,68,71,74,77,80,83,86,89,92,95,98,101,104,107,110,113,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,176,179,182,185,188],{"title":9,"_path":10},"Testing your API with REST Client","/posts/testing-your-api-with-rest-client",{"title":12,"_path":13},"HTML templating in Xamarin","/posts/html-templating-in-xamarin",{"title":15,"_path":16},"Goodbye Azure Portal, Welcome Azure CLI","/posts/welcome-azure-cli",{"title":18,"_path":19},"Coming across Gitpod","/posts/gitpod",{"title":21,"_path":22},"Handle token retrieval while querying an API","/posts/delegating-handler",{"title":24,"_path":25},"Clean up your local git branches.","/posts/cleaning-git-branches",{"title":27,"_path":28},"Automate configuration of Teams Tab SSO with PowerShell.","/posts/teams-sso-powershell",{"title":30,"_path":31},"How to do a technology watch? - Part 1","/posts/technology-watch-part1",{"title":33,"_path":34},"How to do a technology watch? - Part 2","/posts/technology-watch-part2",{"title":36,"_path":37},"You almost no longer need Key Vault references for Azure Functions.","/posts/azure-functions-custom-configuration",{"title":39,"_path":40},"How to do a technology watch? - Part 3","/posts/technology-watch-part3",{"title":42,"_path":43},"Forget DevOps, the future is already here!","/posts/devops-future",{"title":45,"_path":46},"Week 9, 2021 - Tips I learned this week","/posts/w09-2021-tips-learned-this-week",{"title":48,"_path":49},"Week 12, 2021 - Tips I learned this week","/posts/w12-2021-tips-learned-this-week",{"title":51,"_path":52},"Week 14, 2021 - Tips I learned this week","/posts/w14-2021-tips-learned-this-week",{"title":54,"_path":55},"Once upon a time in .NET","/posts/once-upon-a-time-in-dotnet",{"title":57,"_path":58},"Install your applications with winget","/posts/winget-import",{"title":60,"_path":61},"Customize your applications when installing them with winget","/posts/winget-override",{"title":63,"_path":64},"Week 22, 2021 - Tips I learned this week","/posts/w22-2021-tips-learned-this-week",{"title":66,"_path":67},"How to connect to an Azure SQL Database from C# using Azure AD","/posts/sqlclient-active-directory-authent",{"title":69,"_path":70},"Producing packages for Windows Package Manager","/posts/wingetcreate",{"title":72,"_path":73},"4 tips about GitHub Actions environment variables and contexts","/posts/github-actions-var-and-context",{"title":75,"_path":76},"AzureWebJobsStorage, the secret you don't need in your Function App.","/posts/azure-functions-without-azurewebjobsstorage",{"title":78,"_path":79},"ASP.NET Core - Lost in configuration","/posts/lost-in-configuration",{"title":81,"_path":82},"Week 39, 2021 - Tips I learned this week","/posts/w39-2021-tips-learned-this-week",{"title":84,"_path":85},"Week 41, 2021 - Tips I learned this week","/posts/w41-2021-tips-learned-this-week",{"title":87,"_path":88},"Migrating and open-sourcing my blog","/posts/migrating-blog",{"title":90,"_path":91},"Week 45, 2021 - Tips I learned this week","/posts/w45-2021-tips-learned-this-week",{"title":93,"_path":94},"Organize your GitHub stars with Astral","/posts/astral",{"title":96,"_path":97},"Pulumi with an Azure Blob Storage backend","/posts/pulumi-azure-backend",{"title":99,"_path":100},"IaC Hot Reload with Pulumi Watch","/posts/pulumi-watch",{"title":102,"_path":103},"Week 2, 2022 - Tips I learned this week","/posts/w02-2022-tips-learned-this-week",{"title":105,"_path":106},"Week 3, 2022 - Tips I learned this week","/posts/w03-2022-tips-learned-this-week",{"title":108,"_path":109},"Week 5, 2022 - Tips I learned this week","/posts/w05-2022-tips-learned-this-week",{"title":111,"_path":112},"How to provision an Azure SQL Database with Active Directory authentication","/posts/sqldatabase-active-directory-authent",{"title":114,"_path":115},"Why will I choose Pulumi over Terraform for my next project?","/posts/pulumi-vs-terraform",{"title":117,"_path":118},"Week 19, 2022 - Tips I learned this week","/posts/w19-2022-tips-learned-this-week",{"title":120,"_path":121},"Week 20, 2022 - Tips I learned this week","/posts/w20-2022-tips-learned-this-week",{"title":123,"_path":124},"Keeping secrets secure when using API Clients","/posts/http-clients-secrets",{"title":126,"_path":127},"What made me want to be a developer?","/posts/be-a-developer",{"title":129,"_path":130},"What can we do when stuck with a programming problem?","/posts/get-unstuck",{"title":132,"_path":133},"How did I automate the setup of my developer Windows laptop?","/posts/automate-developer-machine",{"title":135,"_path":136},"Discussion about API clients","/posts/http-clients",{"title":138,"_path":139},"Week 46, 2022 - Tips I learned this week","/posts/w46-2022-tips-learned-this-week",{"title":141,"_path":142},"When Pulumi met Nuke: a .NET love story","/posts/when-pulumi-met-nuke",{"title":144,"_path":145},"A year of learning and sharing - Dev Retro 2022","/posts/2022-retro",{"title":147,"_path":148},"Perform Dynamic Execution of an npm Package","/posts/pnpm-dlx",{"title":150,"_path":151},"Manage multiple Node.js versions","/posts/pnpm-env",{"title":153,"_path":154},"Introducing the Vue.js CI/CD series","/posts/vuecicd-introduction",{"title":156,"_path":157},"Execute commands using your project dependencies","/posts/pnpm-exec",{"title":159,"_path":160},"Vue.js CI/CD: Continuous Integration","/posts/vuecicd-ci",{"title":162,"_path":163},"Who is using pnpm?","/posts/pnpm-who-is-using",{"title":165,"_path":166},"Create an Azure-Ready GitHub Repository using Pulumi","/posts/azure-ready-github-repository",{"title":168,"_path":169},"Deploying to Azure from Azure DevOps without secrets","/posts/ado-workload-identity-federation",{"title":171,"_path":172},"Effortlessly Configure GitHub Repositories for Azure Deployment via OIDC","/posts/scripting-azure-ready-github-repository",{"title":174,"_path":175},"Playing with the .NET 8 Web API template","/posts/playing-with-dotnet8",{"title":177,"_path":178},"Another year of sharing and learning - Dev Retro 2023","/posts/2023-retro",{"title":180,"_path":181},"Week 4, 2024 - Tips I learned this week","/posts/w04-2024-tips-learned-this-week",{"title":183,"_path":184},"Using dependency injection with Azure .NET SDK","/posts/azure-sdk-di",{"title":186,"_path":187},"Having Fun With IT Event Calendars","/posts/it-event-calendars",{"title":189,"_path":190},"Call your Azure AD B2C protected API with authenticated HTTP requests from your JetBrains IDE","/posts/http-clients-oauth2","i-heroicons-newspaper",{"title":193,"_path":194,"children":195,"icon":199},"Goodies","/goodies",[196],{"title":197,"_path":198},"My Git Cheat Sheet","/goodies/gitcheatsheet","i-heroicons-gift-solid",{"title":201,"_path":202,"icon":203},"About","/about","i-heroicons-user-circle-solid",{"_path":61,"_dir":205,"_draft":206,"_partial":206,"_locale":207,"title":60,"description":208,"lead":209,"date":210,"image":211,"badge":213,"tags":215,"body":220,"_type":468,"_id":469,"_source":470,"_file":471,"_extension":472},"posts",false,"","In my last article about Windows Package Manager, I said that with winget I was missing \"being able to specify some parameters for a package installation (like the workload and components to install for Visual Studio 2019)\". Well, that was before I went through a few GitHub issues of the winget-cli repository that mentioned the override option.","The override option of winget install command","2021-05-31T00:00:00.000Z",{"src":212},"/images/surface_2.jpg",{"label":214},"Tooling",[216,217,218,219],"development box setup","winget","package manager","tooling",{"type":221,"children":222,"toc":460},"root",[223,248,255,288,300,306,311,380,395,408,436,442,454],{"type":224,"tag":225,"props":226,"children":227},"element","p",{},[228,231,237,239,246],{"type":229,"value":230},"text","In my last article about Windows Package Manager, I said that with winget I was missing \"",{"type":224,"tag":232,"props":233,"children":234},"em",{},[235],{"type":229,"value":236},"being able to specify some parameters for a package installation (like the workload and components to install for Visual Studio 2019)",{"type":229,"value":238},"\". Well, that was before I went through a few GitHub issues of the winget-cli repository that mentioned the ",{"type":224,"tag":240,"props":241,"children":243},"code",{"className":242},[],[244],{"type":229,"value":245},"override",{"type":229,"value":247}," option.",{"type":224,"tag":249,"props":250,"children":252},"h2",{"id":251},"about-the-override-option",[253],{"type":229,"value":254},"About the override option",{"type":224,"tag":225,"props":256,"children":257},{},[258,264,266,271,273,279,281,286],{"type":224,"tag":240,"props":259,"children":261},{"className":260},[],[262],{"type":229,"value":263},"winget install",{"type":229,"value":265}," official documentation says the ",{"type":224,"tag":240,"props":267,"children":269},{"className":268},[],[270],{"type":229,"value":245},{"type":229,"value":272}," option to the ",{"type":224,"tag":240,"props":274,"children":276},{"className":275},[],[277],{"type":229,"value":278},"install",{"type":229,"value":280}," command can be used to provide a \"",{"type":224,"tag":232,"props":282,"children":283},{},[284],{"type":229,"value":285},"string that will be passed directly to the installer",{"type":229,"value":287},"\". What does that mean exactly?",{"type":224,"tag":225,"props":289,"children":290},{},[291,293,298],{"type":229,"value":292},"When you install a program on your laptop, the installer GUI often prompts you to configure some parameters for the program. For instance, Git installer lets you choose how you want to handle CRLF. Each installer has its own parameters that you can specify on the command line if you run the installer exe in your terminal. When using winget CLI, you can also specify these parameters by passing them as the value of the option ",{"type":224,"tag":240,"props":294,"children":296},{"className":295},[],[297],{"type":229,"value":245},{"type":229,"value":299},".",{"type":224,"tag":249,"props":301,"children":303},{"id":302},"an-example-with-visual-studio-2019-installation",[304],{"type":229,"value":305},"An example with Visual Studio 2019 installation",{"type":224,"tag":225,"props":307,"children":308},{},[309],{"type":229,"value":310},"If we take the example of Visual Studio 2019, let's say we want to install it with the English language pack and the Azure workload. To do that we can run the following command:",{"type":224,"tag":312,"props":313,"children":317},"pre",{"className":314,"code":315,"language":316,"meta":207,"style":207},"language-powershell shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","winget install Microsoft.VisualStudio.2019.Enterprise --silent --override \"--wait --quiet --addProductLang En-us --add Microsoft.VisualStudio.Workload.Azure\"\n","powershell",[318],{"type":224,"tag":240,"props":319,"children":320},{"__ignoreMap":207},[321],{"type":224,"tag":322,"props":323,"children":326},"span",{"class":324,"line":325},"line",1,[327,333,339,344,350,355,359,364,369,375],{"type":224,"tag":322,"props":328,"children":330},{"style":329},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[331],{"type":229,"value":332},"winget install Microsoft.VisualStudio.",{"type":224,"tag":322,"props":334,"children":336},{"style":335},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[337],{"type":229,"value":338},"2019.",{"type":224,"tag":322,"props":340,"children":341},{"style":329},[342],{"type":229,"value":343},"Enterprise ",{"type":224,"tag":322,"props":345,"children":347},{"style":346},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[348],{"type":229,"value":349},"--",{"type":224,"tag":322,"props":351,"children":352},{"style":329},[353],{"type":229,"value":354},"silent ",{"type":224,"tag":322,"props":356,"children":357},{"style":346},[358],{"type":229,"value":349},{"type":224,"tag":322,"props":360,"children":361},{"style":329},[362],{"type":229,"value":363},"override ",{"type":224,"tag":322,"props":365,"children":366},{"style":346},[367],{"type":229,"value":368},"\"",{"type":224,"tag":322,"props":370,"children":372},{"style":371},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[373],{"type":229,"value":374},"--wait --quiet --addProductLang En-us --add Microsoft.VisualStudio.Workload.Azure",{"type":224,"tag":322,"props":376,"children":377},{"style":346},[378],{"type":229,"value":379},"\"\n",{"type":224,"tag":225,"props":381,"children":382},{},[383,385,394],{"type":229,"value":384},"You can find the documentation of the visual studio installer with the parameters I used ",{"type":224,"tag":386,"props":387,"children":391},"a",{"href":388,"rel":389},"https://docs.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio?view=vs-2019#bootstrapper-commands-and-command-line-parameters",[390],"nofollow",[392],{"type":229,"value":393},"here",{"type":229,"value":299},{"type":224,"tag":249,"props":396,"children":398},{"id":397},"why-override",[399,401,406],{"type":229,"value":400},"Why ",{"type":224,"tag":240,"props":402,"children":404},{"className":403},[],[405],{"type":229,"value":245},{"type":229,"value":407},"?",{"type":224,"tag":225,"props":409,"children":410},{},[411,413,418,420,425,427,434],{"type":229,"value":412},"So ",{"type":224,"tag":240,"props":414,"children":416},{"className":415},[],[417],{"type":229,"value":245},{"type":229,"value":419}," is a really useful option because it allows us to customize our program installations. The name ",{"type":224,"tag":240,"props":421,"children":423},{"className":422},[],[424],{"type":229,"value":245},{"type":229,"value":426}," could seem a bit strange but it is to indicate that we override the default parameters that could have been specified in the manifest of the package you are installing. By the way, the packages and their manifests can be found in ",{"type":224,"tag":386,"props":428,"children":431},{"href":429,"rel":430},"https://github.com/microsoft/winget-pkgs/",[390],[432],{"type":229,"value":433},"this GitHub repository",{"type":229,"value":435},". If you look at some of them you will see what parameters they use by default and be able to know if you need to override them to fit your needs.",{"type":224,"tag":249,"props":437,"children":439},{"id":438},"pros-and-cons",[440],{"type":229,"value":441},"Pros and cons",{"type":224,"tag":225,"props":443,"children":444},{},[445,447,452],{"type":229,"value":446},"As we said, each installer has its own parameters so if we want to customize our installations we will have to look at the documentation of each installer which can be quite tiresome. If we compare to Chocolatey it is more or less the same but on Chocolatey site, each package has a page with most of the time the parameters documentation or at least a link to the documentation of the installer. Winget clearly lacks that. Yet, even if it requires a bit of effort to find the parameters of a package, thanks to the ",{"type":224,"tag":240,"props":448,"children":450},{"className":449},[],[451],{"type":229,"value":245},{"type":229,"value":453}," option we can fully customize its installation and that's great.",{"type":224,"tag":455,"props":456,"children":457},"style",{},[458],{"type":229,"value":459},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":207,"searchDepth":461,"depth":461,"links":462},2,[463,464,465,467],{"id":251,"depth":461,"text":254},{"id":302,"depth":461,"text":305},{"id":397,"depth":461,"text":466},"Why override?",{"id":438,"depth":461,"text":441},"markdown","content:1.posts:18.winget-override.md","content","1.posts/18.winget-override.md","md",[474,489],{"_path":64,"_dir":205,"_draft":206,"_partial":206,"_locale":207,"title":63,"description":475,"lead":476,"date":477,"image":478,"badge":480,"tags":482,"_type":468,"_id":487,"_source":470,"_file":488,"_extension":472},"This week I learned some Azure CLI commands, how to have JSON IntelliSense in vscode and that Azure Storage Explorer was usable again.","IntelliSense in vscode, Azure CLI command to get assigned roles, and Azure Storage Explorer new version.","2021-06-07T00:00:00.000Z",{"src":479},"/images/surface_1.jpg",{"label":481},"Tips",[483,484,485,486],"tips learned this week","vscode","Azure CLI","Azure","content:1.posts:19.w22-2021-tips-learned-this-week.md","1.posts/19.w22-2021-tips-learned-this-week.md",{"_path":58,"_dir":205,"_draft":206,"_partial":206,"_locale":207,"title":57,"description":490,"lead":491,"date":492,"image":493,"badge":494,"tags":495,"_type":468,"_id":496,"_source":470,"_file":497,"_extension":472},"Using Windows Package Manager import to install multiple applications.","Winget import a promising feature","2021-05-26T00:00:00.000Z",{"src":212},{"label":214},[216,217,218,219],"content:1.posts:17.winget-import.md","1.posts/17.winget-import.md",1716749601646]