This section contains an assortment of tools and guides to aid in streamlining the process of installing and setting up applications within my Windows environment.
Install Applications from Manifests
Getting up and running with a fresh Windows reinstall or even setting up a VM for testing is a tedious and time consuming process when it comes to installing applications. Instead of the typical "What applications did I have installed?" conundrum, I've built JSON formatted manifests to track the applications I use. These manifests make it easier to automate the tedious installation process with the help of Winget, the Windows package manager. The overall goal of the InstallManifests PowerShell script is to avoid the process of manually reinstalling applications with a system that can quickly replicate my ideal suite of applications on a new machine.
-
Clone dev.env repo down to your local machine if it hasn't already.
-
Open PowerShell and change the Current Working Directory (CWD) to the Apps folder.
👀 ProTip: You can open PowerShell directly from the Apps folder in File Explorer by typing PowerShell in the address bar or
Shift + Right Click
in File Explorer. -
Running the following command installs applications from
core.json
by default.
.\InstallManifests.ps1
To install a specific manifest, use the -manifest
parameter and the name of the manifest file.
.\InstallManifests.ps1 -manifest 'dev'
Install apps found in two or more manifests by passing in a comma separated string.
.\InstallManifests.ps1 -manifest 'core, dev'
Install apps found in all manifests by passing in the tags all or full.
.\InstallManifests.ps1 -manifest 'all'
Additional details can be found by running:
Get-Help ".\InstallManifests.ps1" -full
The manifests themselves are just trimmed down JSON exports from WingetUI that contain applications installed on my local machine. Manifests can easily be organized into thematic flavors by modifying the Packages array within the Winget section of the exported JSON file. The Packages array is composed of one or more key/value structures where PackageIdentifier contains the unique ID used by the Windows Package Manager to identify an application. Optional properties such as Version can be added to specify the exact version to install and customArgs which uses the --override
option to pass a string that's passed directly to the installer.
{
"Packages":[
{
"PackageIdentifier": "Microsoft.VisualStudioCode",
"Version": "1.80.0",
"customArgs": "/SILENT /mergetasks=\"!runcode,addcontextmenufiles,addcontextmenufolders\""
}
]
}
Note: While the customArgs property is not apart of the standard winget schema, the script will automatically process any applications that contain this property. This provides the flexibility to customize the installation of an application with the
--override
option.
For more info on the --override
option, check out the following resources: 1, 2, 3, 4, 5, 6
Note: While WingetUI can import and install the application manifests, it currently does not have the ability to parse additional properties such as Version and pass in custom commands to the
--override
option. WingetUI comes into play as it wraps an easy to use GUI around the Winget package manager (and others such as Scoop, Chocolatey, and more) to easily download, install, update and uninstall software.