Visual Studio Setup

Installation and containerization of the Visual Studio family of products

vswhere now searches older versions of Visual Studio

One of the top requests I kept hearing for vswhere was to also search older versions of Visual Studio. You can now do that starting with the latest release. Even if you don't have Visual Studio 2017 or newer installed - which means the query API is not even registered - you can use vswhere to find the installation root directory for Visual ...

Visual Studio Setup PowerShell Module Available

To make the new setup configuration APIs more accessible to developers, we have published the "VSSetup" PowerShell module on powershellgallery.com, making it quick and easy to install. If you have Windows Management Framework (WMF) 5.0 or newer - installed with Windows 10 - or PowerShellGet for PowerShell 3.0 or 4.0, you can run the following...

How to relocate the Package Cache

Visual Studio can require a lot of space on the system drive. Based on years of data collected from customers’ installations from the Customer Experience Improvement Program, we took advantage of this feature in Burn – the Windows Installer XML (WiX) chainer – to eliminate most errors during repair, servicing, and even uninstall. This ...

Functional Testing of Cmdlets

While developing unit and functional tests for Windows Installer PowerShell Extensions, I needed a way to invoke cmdlets without requiring elevation on Vista. That is, of course, because running elevated has always been a bad idea unless it is required. In order to load a PowerShell snap-in, however, one must write to HKEY_LOCAL_MACHINE which ...

Group by Different Properties for Format-Table

For my Windows Installer PowerShell Extensions, I've been simplifying some of the use cases and adding additional formats. One thing I wanted to do was display source list information in a table and group either by the attached ProductCode or PatchCode properties. The format-table cmdlet doesn't support multiple properties and doesn't appear ...

WiX Extension for PowerShell Snap-ins

To write an installer for your PowerShell snap-in, the PowerShell documentation instructs you to extend the PSSnapIn or CustomPSSnapIn class. When you add your snap-in assembly to the Custom Action view in a Windows Installer Project in Visual Studio, the InstallerClass property should be set to True and your installer class will be run when ...