vicker313 tech blog

November 26, 2008

How to offline install Visual Studio Express without download the whole image file

Filed under: .Net — Tags: — vicker313 @ 1:46 am

Visual Studio Express (VSE) is the free version of Visual Studio, released together with Visual Studio 2005 and 2008. User can get VSE from MSDN website without any genuine checking. There are two ways in getting VSE.

The first method is web install, which the user needs download a bootstrap of a selected VSE product, run it and the bootstrap will automatically download setup files from internet and install the product into the computer. The next time user wants to install the software in another computer, the bootstrap will download the whole things again from the internet in order to perform the installation.

The other method is of course offline install, which user needs to download the whole image file from the internet, and either burn it or virtual it in order to perform the installation. However the image file consists of everything (Visual Studio Web Developer, C#, Visual Basic, SQL Server, framework and other stuffs), and making it more than 700MB (which a normal CD cannot hold).

In my scenario, I want to download Visual Studio Web Developer Express only, and will install the software in another computer without any internet connection. I don’t want to download the whole image file that I might just be using 10% of the files. There isn’t any official way to download a single product of VSE, so we need to play around with the bootstrap in order to download a workable offline installation file.

First, download your selected product bootstrap. And then we need to extract the bootstrap into a directory using some compression tool like WinRAR.

Second, we search for a file called baseline.dat inside the directory and open it with notepad or other editor. Then we search for a section called [vs_setup.dll] (it is square bracket). Under that section, you can find a URL parameter with the value of fwlink…

Third, open a browser and type in go.microsoft.com/ followed by the URL value that found in baseline.dat at the address bar (as a result your address will look like go.microsoft.com/fwlink…). It will automatically download the installation file of that product. It is usually about 50MB.

Forth, after we download the installation file, we extract the file into another directory. There will be a file called vs_setup.msi. Then we need to run a command prompt, go to that directory, and use the command below to execute the installation file.

msiexec /i vs_setup.msi vsextui=1 addlocal=all reboot=reallysuppress

If we run the file vs_setup.msi directly, there will be an error to request you to run the setup.exe file. So at the command, vsextui=1 make the installation think it is executed through a setup.exe file.

However when I try out the trick for VSE 2005 product, there is a little difference in the forth step. Instead of extract the installation file into another directory, I extract it to the same directory as I extract the bootstrap. Then I can install the product by using the setup.exe from the bootstrap.

And that’s about it in how to offline install VSE without download the image file. I have used this trick to install VSE Web Developer 2005, Web Developer 2008 and C# 2008.

To install SQL Server Express 2008, you might refer here.

Advertisements

Blog at WordPress.com.