How to guess the contents of a setup

From time to time, you may need to guess the contents of a setup, maybe because some condition fails and doesn’t install, or maybe you want to make it work with a new version of Visual Studio or Windows.

The approach to guess the contents of a setup depends on the type of setup:

  • For example, .vsix extensions for Visual Studio are really .zip files, so you can rename them to .zip (or add that extension) and then you can simply unzip them:That way you can for example modify the contents of the extension.vsixmanifest file to make an extension compatible with a new version of Visual Studio if the owner has disappeared or doesn’t upgrade it.
  • For setups that are .exe files, normally when run they are uncompressed in the temp folder (C:\Users\<user>\AppData\Local\Temp), so you can clean the contents of that folder, run the setup.exe and then see what has been created in that folder. Imagine for example that you want to know the components of the Microsoft Build Tools 2015. How would you know if the docs don’t provide that information? After the first initial dialog, you would go to the temp folder:
    And you would open the LocalizableStrings.xml file, that contains the selectable items:
  • For setups that are .msi files, you can use the orca.exe tool, that is able to open those files to see their internal tables (msi files are like databases). To get the orca.exe tool installed is a bit convoluted, so here he go:
    • Download a Windows SDK, such as Windows SDK 8.1
    • Select the MSI Tools:
    • Go to folder where the SDK was installed, locate the Orca-x86_en-us.msi installer and run it:
    • Finally go to the folder where the orca.exe tool is installed:

    Now you can right-click any .msi file and select the “Edit with Orca” menu entry. Here you can see File table of the Orca-x86_en-us.msi file that we used to install the orca.exe tool:

Running Visual Studio or setups with DPI virtualization (DPI-unaware) on high DPI displays

The high-DPI (retina) displays pose some problems to us developers, so that we need to modify our applications to make them DPI-aware. In the post Visual Studio extensions and DPI-awareness I explained how I became DPI-aware and the painful experience to make my application (an extension for Visual Studio) DPI-aware. If you don’t know about DPI-awareness, start with that post.

In this post, I am going to explain how to do the opposite: to make an application that claims to be DPI-aware run as DPI-unaware. Technically this is called DPI virtualization mode, where the application thinks that it is running at 96 dpi and the Windows OS scales its window as a bitmap to the proper size. The result is that the application appears blurred but it’s usable, while in DPI-aware mode it has problems (by the way, if your problem is the opposite, see the Knowledge Base article Some desktop applications may appear blurred on high-DPI displays).

I have found a couple of scenarios where I have wanted some applications to become DPI-unaware even at the cost of appearing blurred on my retina display:

The first case is designing Windows Forms with Visual Studio. Modern versions of Visual Studio (2015, 2017) are truly DPI-aware but they alter the designer files of Windows Forms, so you need to either use a non-retina display, or to use a virtual machine with retina display disabled or to set the retina display scaling to 100% instead of 200% or 250%, which makes everything tiny and unreadable. But there is a better solution: you can make Visual Studio (or any process) DPI-unaware adding the following registry entry:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\devenv.exe]
"dpiAwareness"=dword:00000000

(Thanks to Tanya Solyanik, from Microsoft, that provided me this trick).

The other case is an application that claims that it is DPI-aware, but it is not really. For example, the setup of the Windows SDK 7.1 (you may download it as winsdk_web.exe, but once executed the process is really sdksetup.exe). You can see here in Process Explorer that it claims that its DPI-awareness is “System Aware”:

But when executed on a retina display, it becomes tiny and truncated:

When creating the registry entry above for SDKSetup.exe:

then it displays with the correct size and without truncations, that is, usable (although blurred):

I hope this post helps if you are in one of those two scenarios.

Licensing the Visual Studio family of products (or using them for free)

A common question that you may have about using legally Visual Studio is which are your options. As always happens with licensing, it is a somewhat complex subject with quite a lot of options, but the good news is that if you are an individual developer or a small team, you can use all the family of Visual Studio products for free. I am not a lawyer, so validate all this information with a lawyer or legal department. The purpose of this post is to provide you the pointers to the different options.

The first thing to know are the products and editions:

  • Visual Studio
    • Visual Studio Community Edition
    • Visual Studio Professional Edition
    • Visual Studio Enterprise Edition
  • Visual Studio Code
  • Visual Studio Team Services
  • Team Foundation Server
    • Team Foundation Server
    • Team Foundation Server Express Edition

Licensing Visual Studio

Visual Studio Professional Edition and Enterprise Edition are paid versions, while the Community Edition is free for some scenarios.

You can compare the three editions on this page:

Compare Visual Studio 2015 Offerings

For Visual Studio Professional Edition and Enterprise Edition, you can compare the purchase options (Standalone for the Professional Edition, or Standard / Cloud subscriptions for both editions) on this page:

Visual Studio Purchasing Options

Visual Studio 2015 Community Edition is free under these scenarios (see Visual Studio Community):

  • For individuals: Any individual developer can use Visual Studio Community to create their own free or paid apps.
  • For non-enterprise organizations (meaning those with ≤250 PCs and ≤$1 Million US Dollars in annual revenue): Up to five users can use Visual Studio Community.
  • For enterprise organizations (meaning those with >250 PCs or >$1 Million US Dollars in annual revenue): Visual Studio Community can be used for the following scenarios:
    • In a classroom learning environment
    • For academic research
    • For contributing to open source projects

The exact details for the license terms of Visual Studio 2015 Community edition are here:

MICROSOFT SOFTWARE LICENSE TERMS. MICROSOFT VISUAL STUDIO COMMUNITY 2015

Licensing Visual Studio Code

Visual Studio Code is both open source and free. The detailed license is here:

MICROSOFT SOFTWARE LICENSE TERMS. MICROSOFT VISUAL STUDIO CODE

Licensing Visual Studio Team Services

Visual Studio Team Services distinguishes three kind of users:

Licensing Team Foundation Server

If you don’t like the idea of using Team Services on the cloud, you can use Team Foundation Server on-premises:

  • For individuals or teams up to 5 developers, you can use the free Team Foundation Server Express, that you can download here.
  • For teams with more than 5 developers you need to pay for the additional developers as explained here: Buy access to Team Foundation Server or TFS Test hub.

Finally, the ultimate guide for licensing Visual Studio, Visual Studio Team Services or Team Foundation Server is this white paper:

Visual Studio 2015 Licensing White Paper