Wiki

Clone wiki

ntobjx / build / setup-vs2005 / Home

Installing Visual C++ 2005 Professional

Since Visual Studio 2005 Professional (from here on referred to as VS2005) was released prior to the release of Vista, Windows versions since Vista had occasional problems running VS2005.

This article is meant to guide you (and my future self) through the process. The screenshots shown were taken on Windows 10 (1803, 32-bit and 64-bit respectively).

Preliminary notes

To achieve installing Visual C++ 2005 Professional, the only component I care about from that Visual Studio version, there are a bunch of options. The manual one requires the original RTM installation media and then the updates which I am listing below. The slipstreaming method is somewhat more convoluted to prepare, but every time you have to set up VS2005 in the future, it will pay off. You kind find out about preparing such an installation media towards the end of this article.

Manual installation of Visual C++ 2005 Professional

Prerequisites

  • Vanilla up-to-date installation of Windows Vista, 7, 8, 8.1 or 10.
  • .NET 2.0 Framework
  • VS2005 installation media
  • VS2005 patches (see below)
  • Windows 7 SP1 SDK
    Please note that this isn't strictly necessary. But it may be necessary to build projects I created.

Patches we'll install

The following list contains the date a particular patch/hotfix got released as well as a brief description of its purpose and the executable file name in which it comes/came.

  1. 2006-12-14 KB926601 Visual Studio 2005 Service Pack 1
    VS80sp1-KB926601-X86-ENU.exe
  2. 2007-03-06 KB932232 Visual Studio 2005 Service Pack 1 Update for Windows Vista
    VS80sp1-KB932232-X86-ENU.exe
  3. 2009-07-28 KB971090 Visual Studio 2005 Service Pack 1 ATL Security Update
    VS80sp1-KB971090-X86-INTL.exe
  4. 2009-08-10 KB973673 Visual Studio 2005 Service Pack 1 ATL for Smart Devices Security Update
    VS80sp1-KB973673-X86-INTL.exe
  5. 2011-06-07 KB2538218 Security Update for Microsoft Visual Studio 2005 Service Pack 1
    VS80sp1-KB2538218-v2-X86-INTL.exe
  6. 2011-08-09 KB2548826 Security Update for Microsoft Visual Studio 2005 Service Pack 1
    VS80sp1-KB2548826-v4-X86-INTL.exe
  7. 2011-08-11 KB2251481 Microsoft Visual Studio 2005 Service Pack 1 XML Editor Security Update
    VS80sp1-KB2251481-v3-X86-INTL.exe
  8. 2011-10-08 KB949009 Fatal error LNK1103 debugging information corrupt
    VS80sp1-KB949009-X86-INTL.exe
  9. 2014-05-16 KB2938803 Update for Microsoft Visual Studio 2005 Service Pack 1
    VS80sp1-KB2938803-X86-INTL.exe

As you can see the list is quite extensive. Since - with the exception of the service pack (first in the list) itself - we don't know which patches are cumulative, if any, we have to install all of them one by one.

Preparing Windows to run VS2005

Note: if you were to skip this step you'd be greeted with an error stating that the .NET 2.0 Framework is required to run the IDE.

  1. alright, so head over to the Control Panel (yeah, the classic one!) and click Programs
    Control Panel
  2. there pick the Turn Windows features on or off option
    Control Panel/Programs
  3. in the opening dialog you should enable the first item .NET Framework 3.5 (includes .NET 2.0 and 3.0) and confirm your choice by clicking OK
    Windows Features: .NET Framework 3.5 (includes .NET 2.0 and 3.0
  4. in all likelihood Windows will prompt you to download the required files, allow that
    Windows Features: Downloads required

And that's that. We are now set to install Visual Studio itself.

Installation of VS2005 itself

These are the illustrated steps to install VS2005.

  1. in an elevated Command Prompt invoke the setup program
    • open an elevated Command Prompt (i.e. as administrator/privileged user)
    • one method is to press the Windows key and then, holding it, R to bring up the Run dialog and enter cmd there and hit the Enter/Return key
    • change to the drive in which your VS2005 media is located, e.g. D:
    • execute the installer from the root of the installation media thusly: vs\setup.exe /no_bsln_check
      Elevated Command Prompt
      Note: The /no_bsln_check will remove the checks for prerequisites. If you want to install more than merely the Visual C++ toolset, I recommend you leave off that switch. But in that case other steps of this guide may deviate or shown ones may fail.
  2. the graphical installer should start, click the Install Visual Studio 2005 "link" VS2005 setup overview
  3. click Next on the first wizard page, once the button becomes available
    VS2005 setup wizard - Preparations
  4. agree to the EULA and proceed to the wizard page by clicking Next
    VS2005 setup wizard - EULA
    Note: in my VS2005 setup from MSDN it was not necessary to enter a product key as that was already hardcoded on the media inside setup.sdb.
  5. choose the location where to install VS2005 - I always leave the default here - then pick the Custom feature set and click Next VS2005 setup wizard - Options Page: Install Path and Feature Set
  6. on the following page, which arguably depends on the choice of Custom on the previous one, select the individual components for installation
    VS2005 setup wizard - Options Page: Individual Feature
    The choice is generally yours, but you may run into trouble down the road if you choose a different set of components than I
    • Select all Language Tools and don't forget to also check X64 Compilers and Tools inside the Visual C++ node.
    • Deselect all languages other than Visual C++. You may also want to deselect the Visual Web Developer option as well as Smart Device Programmability (which has to do with very very old "smart phones").
    • Deselect all other second-level components with the exception of Tools for Redistributing Applications.
  7. click the Install button
    VS2005 setup wizard - Install Page
  8. eventually you should see the installation finishing successfully
    VS2005 setup wizard - Finish Page

That's it. As far as the product is concerned, you're now done.

Applying the patches

Note: If you ran an already slipstreamed setup you are now done for good and can skip the installation of patches/hotfixes. I.e. you may skip this whole section.

You needn't reboot or anything prior to installing the patches on top of the vanilla VS2005 installation. The only thing you need to ensure is to run the executables as administrator. But typically Windows should prompt you anyway.

NB: Again this illustrated guide will skip non-essential screens such as the EULA and progress windows which don't have any relevance.

  1. 2006-12-14 KB926601 Visual Studio 2005 Service Pack 1
    Execute VS80sp1-KB926601-X86-ENU.exe
    Prompt: VS80sp1-KB926601-X86-ENU.exe
    Success: VS80sp1-KB926601-X86-ENU.exe
  2. 2007-03-06 KB932232 Visual Studio 2005 Service Pack 1 Update for Windows Vista
    VS80sp1-KB932232-X86-ENU.exe
    Prompt: VS80sp1-KB932232-X86-ENU.exe Success: VS80sp1-KB932232-X86-ENU.exe
  3. 2009-07-28 KB971090 Visual Studio 2005 Service Pack 1 ATL Security Update
    VS80sp1-KB971090-X86-INTL.exe
    Prompt: VS80sp1-KB971090-X86-INTL.exe
    Success: VS80sp1-KB971090-X86-INTL.exe
  4. 2009-08-10 KB973673 Visual Studio 2005 Service Pack 1 ATL for Smart Devices Security Update
    VS80sp1-KB973673-X86-INTL.exe
    Prompt: VS80sp1-KB973673-X86-INTL.exe
    Success: VS80sp1-KB973673-X86-INTL.exe
  5. 2011-06-07 KB2538218 Security Update for Microsoft Visual Studio 2005 Service Pack 1
    VS80sp1-KB2538218-v2-X86-INTL.exe
    Prompt: VS80sp1-KB2538218-v2-X86-INTL.exe
    Success: VS80sp1-KB2538218-v2-X86-INTL.exe
  6. 2011-08-09 KB2548826 Security Update for Microsoft Visual Studio 2005 Service Pack 1
    VS80sp1-KB2548826-v4-X86-INTL.exe
    Prompt: VS80sp1-KB2548826-v4-X86-INTL.exe
    Success: VS80sp1-KB2548826-v4-X86-INTL.exe
  7. 2011-08-11 KB2251481 Microsoft Visual Studio 2005 Service Pack 1 XML Editor Security Update
    VS80sp1-KB2251481-v3-X86-INTL.exe
    Prompt: VS80sp1-KB2251481-v3-X86-INTL.exe
    Success: VS80sp1-KB2251481-v3-X86-INTL.exe
  8. 2011-10-08 KB949009 Fatal error LNK1103 debugging information corrupt
    VS80sp1-KB949009-X86-INTL.exe
    Prompt: VS80sp1-KB949009-X86-INTL.exe
    Success: VS80sp1-KB949009-X86-INTL.exe
  9. 2014-05-16 KB2938803 Update for Microsoft Visual Studio 2005 Service Pack 1
    VS80sp1-KB2938803-X86-INTL.exe
    Prompt: VS80sp1-KB2938803-X86-INTL.exe
    Success: VS80sp1-KB2938803-X86-INTL.exe

First launch

I strongly recommend using a tool like SuRun to auto-start VS2005 as privileged user. As an alternative you may adjust the shortcut settings like so.

  1. if Cortana doesn't show you the Visual Studio 2005 shortcut via search, you may find it here: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Visual Studio 2005
  2. right click the shortcut and edit its Properties (you may also pin it to the task bar and edit the properties of that copy)
    Shortcut Properties
  3. from the Properties, open the Advanced dialog and check the Run as administrator checkbox
    Shortcut Advanced Properties
  4. confirm your choice by clicking OK (and, if you chose to edit the shortcut for All Users confirm the elevation prompt as well)

Now, once you start the IDE from the start menu (or by whichever other means), you will see this prompt the first time around.

A gentle reminder to run VS2005 as admin

You may also run into this error

If you didn't clear the check mark for Visual Web Developer or some of the other features, you may see the following error message box.

J# warning message

Dismissing that, you should see another warning message which helpfully tells you that loading this component will be disabled for the next launch of the IDE, provided you choose Yes. Deal with it as you will. One option would be to install the prerequisite as per the adminreadme.htm file included on the VS2005 installation media from wcu\JSharpRedistCore\vjredist.exe (or vs\wcu\JSharpRedistCore\vjredist.exe, depending on the installation media).

(Optional) installation of the Windows 7 SP1 SDK

Personally I always install this SDK, also known as Windows 7.1 SDK, on machines which have VS2005 installed. You do it as follows.

  1. on Windows 10, and possibly other Windows versions as well, you may have to uninstall any Visual C++ 2010 Redistributables as per this discussion
    Note: I have not been able to install the Visual C++ Compilers option on Windows 10. If I find out, this step will be amended.
  2. close any instances of the VS2005 IDE and tools
  3. insert the installation media for the Windows 7 SP1 SDK
    • GRMSDK_EN_DVD.iso if you're on a 32-bit Windows
    • GRMSDKX_EN_DVD.iso if you're on a 64-bit Windows (IIRC)
  4. open an elevated Command Prompt or start setup.exe elevated by other means
  5. dismiss the following warning
    Some Windows SDK components require the RTM .NET Framework 4. Setup detected a pre-release version of the .NET Framework 4. If you continue with Setup, these components will not be installed. If you want to install these components, click Cancel, then install the .NET Framework 4 from http://go.microsoft.com/fwlink/?LinkID=187668 and then rerun Setup.
    The link is dead, by the way.
  6. proceed from the welcome page of the setup wizard
    SDK setup: Welcome Page
  7. ... to the Installation Options page and select the components as follows
    SDK setup: Installation Options
    Here I generally deselect everything but the Windows Headers and Libraries and the Tools options.
  8. ... after which you proceed to the Begin Installation page
    SDK setup: Begin Installation
  9. ... after which see the Installation Progress page with the progress bar and lots of text that changes faster than most of us can read
    SDK setup: Installation Progress
  10. ... which at last should drop you to the Installation Complete page
    SDK setup: Installation Complete

Configure VS2005 to use the Windows 7 SP1 SDK

After completing the installation, you will want to use the Windows SDK Configuration Tool to integrate the freshly installed Windows SDK into your existing VS2005 installation.

This ensures you can use all those modern header files and libs and still target systems down to Windows 2000, if I'm not mistaken.

Start the Windows SDK Configuration Tool, once more as administrator/elevated. If Cortana gives you a hard time finding it, here you go: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Windows SDK v7.1\Visual Studio Registration (or look for WindowsSdkVer.exe).

Windows SDK Configuration Tool

Select 7.1 in the combo box. That is the version number for the Windows 7 SP1 SDK. Lastly click the Make current button. A message box will prompt you again (if your installation is indeed a fresh one, there's nothing to lose here).

Windows SDK Configuration Tool

And once you confirmed the desire to make the changes, you should be getting this.

Success - Windows SDK Configuration Tool

However I am aware of one particular issue. The Windows SDK Configuration Tool really hates being run on a system where the decimal separator is not a .. For example on a German system this would be a comma (,) and so the tool would fail. Changing the setting for the decimal separator prior to running the Windows SDK Configuration Tool and changing it back afterwards will work around the issue, though.

If you want to verify that the settings indeed took indeed effect, check it in the VS2005 Options.

Verify settings in VS2005 Options

One more thing you may want to do

VS2005 could never handle Vista Icons (the ones with higher resolution PNG files embedded). This can be mitigated by copying the rc.exe and rcdll.dll from the Windows 7 SP1 SDK over into C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin (or C:\Program Files\Microsoft Visual Studio 8\VC\bin), overwriting the existing files there. You can find suitable versions inside the Windows 7 SP1 SDK, typically under C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1 (or C:\Program Files\Microsoft SDKs\Windows\v7.1).

Slipstreaming Visual Studio 2005 Professional patches/hotfixes

NB: I did this with the installation media for Visual Studio 2005 Professional which I obtained from MSDN as a subscriber.

The steps for slipstreaming are relatively simple to do with some NT scripting.

In brief it comes down to the following steps

  1. create an admin install share from the VS2005 installation media
  2. unpack the patches (.msp files) from the hotfix installers
  3. apply the patches to the vs_setup.msi in the admin install share
  4. unpack the installation media, take note of its volume label
  5. copy contents from the install share over into the folder from the installation media in which vs_setup.msi lives
  6. clean up the merged folder structure a bit
  7. optionally create a DVD image from the resulting folder structure

There is a blog article by one of the Visual Studio folks which also describes the process, but only for SP1 and also doesn't provide hints on how to automate stuff.

Doing the dance

All the subsequent steps should be performed from an elevated Command Prompt.

Create admin install

Invoke msiexec /a for the vs_setup.msi from the installation media (D:), using the subfolder vs2005-admin-install of the current directory (%CD%) as the admin install share and logging everything verbosely into admin-install.log in the current directory.

start /wait msiexec.exe /a D:\vs\vs_setup.msi TARGETDIR=%CD%\vs2005-admin-install /L*vx %CD%\admin-install.log

The start /wait ensures that we only return to the prompt once the process has finished.

Unpack the .msp files from hotfix installers

To unpack the .msp patch files from the .exe Hotfix/Update/Patch installers use the following command.(.msp files) for slipstreaming we loop over the installer .exe file names.

for /f %i in ('dir /a:-d /b *x86*.exe') do @start /wait %i /extract "%CD%\Patches\%~ni"

The for /f %i in ('dir /a:-d /b *x86*.exe') do lets us execute the subsequent command once per file name returned by dir /a:-d /b *x86*.exe. We then invoke the installer .exe (variable %i) and tell it to extract the respective patch into a subfolder Patches of the current directory (%CD%), placing it into a subfolder of Patches named after the installer .exe (but without the .exe suffix).

Attention: this assumes that you have the relevant .exe files of the patches prepared and named in a way that provides sorting. For example I named them like this:

  • 2006-12-14_VS80sp1-KB926601-X86-ENU.exe
  • 2007-03-06_VS80sp1-KB932232-X86-ENU.exe
  • 2009-07-28_VS80sp1-KB971090-X86-INTL.exe
  • 2009-08-10_VS80sp1-KB973673-X86-INTL.exe
  • 2011-06-07_VS80sp1-KB2538218-v2-X86-INTL.exe
  • 2011-08-09_VS80sp1-KB2548826-v4-X86-INTL.exe
  • 2011-08-11_VS80sp1-KB2251481-v3-X86-INTL.exe
  • 2011-10-08_VS80sp1-KB949009-X86-INTL.exe
  • 2014-05-16_VS80sp1-KB2938803-X86-INTL.exe

Because of the date as part of the file names, the process will happen sequentially in the correct order._

Apply the hotfix patches to the admin install share

As per two steps above we should have a stripped vs_setup.msi in the admin install share (%CD%\vs2005-admin-install). This time we tell it to apply the patch files /p as returned from dir /a:-d /b /s Patches in the following for loop.

for /f %i in ('dir /a:-d /b /s Patches') do @start /wait msiexec /a %CD%\vs2005-admin-install\vs_setup.msi /p %i /L*vx %CD%\%~ni.log

If all goes well, this should do the job of applying the patches in one fell swoop.

Unpack the installation media

You should extract the files from the installation media into a local, writable, folder, say %CD%\slipstreamed.

If you have an .iso file use 7-Zip or WinRAR to unpack it or alternatively mount it and copy the files via your preferred file manager.

Take note of the volume label of that installation media. It will become relevant if you decide to create a new DVD image from the admin install share.

Copy patched installation over

Now copy the contents from the admin install share over into the folder created by extracting the installation media (%CD%\slipstreamed), placing them side-by-side with vs_setup.msi (in my case that was inside the subfolder vs, i.e. %CD%\slipstreamed\vs, but your mileage may vary).

You may overwrite the vs_setup.msi from the installation media with the one from the admin install share. They should be different. In particular the one from the admin install share should be smaller as it will have been stripped of any embedded CAB streams.

Interlude

I pondered the question whether the stripped or original vs_setup.msi should be used ... and opted for the stripped one to ensure that the contents of the (undoubtedly) older CAB streams of the original one don't get used.

Had I strictly followed the steps from the above linked blog article, I should not have done that. However, it works, so I presume everything is fine.

There should be no other clashes of files, the installation media simply has some files the admin install share doesn't have. Notably the vs\Setup folder is missing from the admin install share.

Clean up

Time to clean up %CD%\slipstreamed. In the folder (but not its subfolders!) in which vs_setup.msi lives you can remove any and all .cab files.

I ended up removing the following items:

  • %CD%\slipstreamed\autorun.inf ** %CD%\slipstreamed\*.cab

However, I also placed a Slipstream.txt at the root of %CD%\slipstreamed, listing all the applied hotfixes.

Create slipstreamed DVD image

Personally I use my very own buildiso.cmd along with oscdimg.exe from the Windows ADK to create a DVD image.

buildiso.cmd <LABEL> <DIRECTORY>

So for my purposes I used:

buildiso.cmd DVD1 slipstreamed

... and ended up with a slipstreamed.iso file.

Interlude

In my case the label of the installation media had to be DVD1 (which it was prior to my slipstreaming and "remastering" efforts) ... otherwise at one point during the installation the setup would request the installation media to be inserted (although it already was in the drive).

The reason for this seems to be the VolumeLabel column of the Media table in vs_setup.msi.

If oscdimg.exe happens to crash, remove the -oc option from the invocation of oscdimg.exe in the .cmd file.

Verifying the slipstreamed installation

As the About box shows, we have all relevant hotfixes applied after installing that slipstreamed version of VS2005.

Microsoft Visual Studio 2005
Version 8.0.50727.867  (vsvista.050727-8600)
Microsoft .NET Framework
Version 2.0.50727 SP2

Installed Edition: Professional

Microsoft Visual C++ 2005   77626-009-0000007-41615
Microsoft Visual C++ 2005

Microsoft Web Application Projects 2005   77626-009-0000007-41615
Microsoft Web Application Projects 2005
Version 8.0.50727.867

Hotfix for Microsoft Visual Studio 2005 Professional Edition - ENU (KB2938803)   
This Hotfix is for Microsoft Visual Studio 2005 Professional Edition - ENU. 
If you later install a more recent service pack, this Hotfix will be uninstalled automatically. 
For more information, visit http://support.microsoft.com/kb/2938803

Hotfix for Microsoft Visual Studio 2005 Professional Edition - ENU (KB949009)   
This Hotfix is for Microsoft Visual Studio 2005 Professional Edition - ENU. 
If you later install a more recent service pack, this Hotfix will be uninstalled automatically. 
For more information, visit http://support.microsoft.com/kb/949009

Microsoft Visual Studio 2005 Professional Edition - ENU Service Pack 1 (KB926601)   
This service pack is for Microsoft Visual Studio 2005 Professional Edition - ENU. 
If you later install a more recent service pack, this service pack will be uninstalled automatically. 
For more information, visit http://support.microsoft.com/kb/926601

Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU (KB2251481)   
This Security Update is for Microsoft Visual Studio 2005 Professional Edition - ENU. 
If you later install a more recent service pack, this Security Update will be uninstalled automatically. 
For more information, visit http://support.microsoft.com/kb/2251481

Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU (KB2538218)   
This Security Update is for Microsoft Visual Studio 2005 Professional Edition - ENU. 
If you later install a more recent service pack, this Security Update will be uninstalled automatically. 
For more information, visit http://support.microsoft.com/kb/2538218

Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU (KB2548826)   
This Security Update is for Microsoft Visual Studio 2005 Professional Edition - ENU. 
If you later install a more recent service pack, this Security Update will be uninstalled automatically. 
For more information, visit http://support.microsoft.com/kb/2548826

Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU (KB971090)   
This Security Update is for Microsoft Visual Studio 2005 Professional Edition - ENU. 
If you later install a more recent service pack, this Security Update will be uninstalled automatically. 
For more information, visit http://support.microsoft.com/kb/971090

Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU (KB973673)   
This Security Update is for Microsoft Visual Studio 2005 Professional Edition - ENU. 
If you later install a more recent service pack, this Security Update will be uninstalled automatically. 
For more information, visit http://support.microsoft.com/kb/973673

Update for Microsoft Visual Studio 2005 Professional Edition - ENU (KB932232)   
This Update is for Microsoft Visual Studio 2005 Professional Edition - ENU. 
If you later install a more recent service pack, this Update will be uninstalled automatically. 
For more information, visit http://support.microsoft.com/kb/932232

Updated