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...

Get the Windows Installer PowerShell Module easier with WMF 5.0

Many years ago when PowerShell was first in beta, I saw an opportunity to write cmdlets that I could string together in different ways rather than writing and maintaining a bunch of one-off Windows scripts for various day-to-day tasks and customer diagnostics. I created the Windows Installer PowerShell Module to fill that role. These cmdlets ...

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 ...

Windows Installer PowerShell Module 2.2.1 Released

Yesterday I released servicing update 2.2.1, which updates 2.2.0 to fix a few bugs and add a few cool new features: Version-specific documentation has been added, but the most significant change to the documentation is the complete overhaul of the examples. Apart from removing some old examples using deprecated functionality, I ...

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 ...

Get Binder Variables for Assemblies without Installing into the GAC

Binder variables in WiX are variables that are resolved, coincidentally, at bind time. This is when the linker, light.exe, collects file information, assigns auto-GUIDs, and generates the output packages among other things. There are binder variables for all versioned binaries, and binder variables specific to both managed and native ...

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 ...

Windows Installer PowerShell Extensions 1.0 Beta Released

I have released Windows Installer PowerShell Extensions 1.0 beta, complete with an installer package. I have also added a couple of cmdlets, and format and type configurations for a good out-of-the-box experience when using the cmdlets Get-MSIProductInfo, Get-MSIPatchInfo, and Get-MSIRelatedProductInfo. When I introduced PSMSI, you had to ...