Sunday, July 04, 2004

Are you the sort who finds these automated download installers irritating? I like them in spirit that they let you download only the files that you need, instead of downloading a huge installer upfront. However if the downloader + installer combo is there so that it prevents you from physically acessing the installation files, then it is rather irritating.

 

MS has released the Visual Studio 2005 express editions. These are betas of lightweight versions of Visual Studio. I had a look at one of these at a friend’s desk it was pretty amazing. They seem much more developer friendly than previous version of VS. They have a certain limited support for refactoring as well.

 

However the issue is that the express editions have an installer than does the downloads the installation files, does the installation and deleted the files. You need to provide you passport id to the website to be able to download the installer. My guess is that MS wants to know who all are actually evaluating their product. Which is all fair – but the issue is that after this installer automatically downloads the files required, I have no way of actually accessing them – the installation is automated.

 

This has been really irritating me and for a genuine reason - I would like to install the express edition and play with it at my home machine. However, I don’t have the sort of bandwidth required to download it at home. At office I do have the  bandwidth required, however I don’t want to clutter my work machine with beta-ware.

 

I would like to download the actual installation files at office and take them home somehow.
That is what this post is about.

 

Examining the Installation Process

 

A little peeking at the installer showed that it runs as a process called ‘setup.exe’. That is good.
Setup.exe goes on to display two progress bars, one for downloading some files and one for instllaing them.

 

After a careful look you realize that is downloading the .Net Framework 2.0 using the BITS api of windows. The BITS api is the Background Intelligent Transfer Services api that windows uses for downloading things like patches, in such a way that it uses only unused bandwidth of your system and does not hog bandwidth from any other running applications.

 

The funny thing is that when I am watching the download happening I notice that there is this folder created called

C:\Documents and Settings\< user name>\Local Settings\Temp\VSESETUP

It is here that the framework is being downloaded. The download file is shown as “bit< something>.tmp“. The funny thing is that filemon does not show the setup.exe as the process that is writing to this file. My guess is that work done by the BITS api is not tracked as IO done by the process that made the request to the API.

 

However, this should be the part that is of interest – The framework 2.0 installation is downloaded into the folder

C:\Documents and Settings\< user name>\Local Settings\Temp\VSESETUP\wcu\dotnetframework

It would be named dotnetfx.exe. So that is one file that you need to save.

 

The other file that should be saved is vcssetup.exe in the folder

C:\Documents and Settings\< user name>\Local Settings\Temp\VSESETUP\

 

Both these files will appear when the BITS api has completed. Ie is when the first progress bar has completed. The second progress on the same page is the one that tracks the progress of the framework installation. At this time the installation files are ready copy out.

vcssetup.exe – 28.9 mb

dotnetfx.exe – 24 mb

 

The framework installation is spawned with the following command line switches –

dotnetfx.exe /q:a /c:"install.exe /q /watsongenman=gencomp18.txt"

 

I figured that out courtesy of the log file maintained by setup.exe which is called dd_vsinstall80.txt. It can be found in the folder

C:\Documents and Settings\< user name>\Local Settings\Temp\

 

One thing that was puzzling me was that two exes appeared after the progress bar completed. The progress bar only said that that the framework is being downloaded. The second exe is called vcssetup.exe. I don’t know when it downloaded vcssetup.exe.
Files are
C:\Documents and Settings\< user name>\Local Settings\Temp\VSESETUP\wcu\dotnetframework\dotnetfx.exe

C:\Documents and Settings\< user name>\Local Settings\Temp\VSESETUP\vcssetup.exe

Anyway the framework installation requires a reboot. After the reboot I noticed that both files have been deleted. The installer starts again and then the BITS api runs a second time. This time the file that appears in the download folder is again called vcssetup.exe !! The folder name is same as before :
C:\Documents and Settings\< user name>\Local Settings\Temp\VSESETUP\

I have two copies of this file now and I think I need to do a file comparison to see what the difference is. I expect the first one to be a dud.

 

I think with these dotnetfx.exe and vcssetup.exe files, it should be possible to install the express editions and be able to copy the installation files around. I am afraid that they may not work if the original setup.exe had created some registry entries that these installers check for before running. If that is the case then I may have to go through this whole process again, but this time with regmon running. That will be a pain.

 

The vcssetup.exe was run by the installer with the command line args –

C:\DOCUME~1\< user name>\LOCALS~1\Temp\VSESETUP\.\vcssetup.exe "C:\DOCUME~1\< user name>\LOCALS~1\Temp\VSESETUP\.\vcssetup.exe" /q:a /c:"install.exe /q /watsongenman=vs_setup.dll.txt /msipassthru MSI_ARGS_FILENAME_BEGINC:\DOCUME~1\< user name>\LOCALS~1\Temp\tmp21.tmpMSI_ARGS_FILENAME_END"

 

I am not sure what any of that means right now, but I might need that to do another installation with the installer.

 

Ok I just ran windiff on the two versions of the vcssetup.exe file.. surprise surprise.. they are both the same. But how can that be? Does the installer actually the download the same ~30mb size file twice?

 

While the file was being downloaded the second time I did do a ‘ipconfig /release’ and the download did not seem to progress, so it does seem like they are actually doing a download a second time. (Damn I should have started a packet sniffer to check).

 

Trying to do the install with the Installer files

vcssetup.exe – 28.9 mb

dotnetfx.exe – 24 mb

 

I ran vcssetup.exe on a machine where I already had .Net 2.0 installed (the version that came along with Monad) and the installer refused to run saying that .Net 2.0 is not installed. I am guessing that this is a later build of .Net framework 2.0.

 

Ran the framework installer and it complained that an incompatible version of itself is already installed. Fair enough (considering that 2.0 is sill under development).

 

And bingo it works.

 

To Summarize

 

If you want to install VS 2005 express editions on a system where you down have a fast enough internet connection, this is what you need to do to get the installation files –

 

Start the installer program that does the download for you. At the point in the installation where it says that the download has completed and that the installation process is starting you should copy out the contents of the folder

C:\Documents and Settings\< user name>\Local Settings\Temp\VSESETUP

 

Specifically, you should find 2 files

vcssetup.exe – 28.9 mb

dotnetfx.exe – 24 mb

 

These should let you install the VS on any other machine of your choice. This entire process is applicable for VC# installation – however I would expect that similar approach exists for the other parts as well.

 

The information provided in this blog is for informative purposes only and is intended to help people who are facing a genuine issue. I am not responsible for any misuse of this information.

Thursday, September 01, 2005 12:13:21 AM (Eastern Standard Time, UTC-05:00)
OK seems to work now with this information
Tuesday, October 11, 2005 5:10:48 PM (Eastern Standard Time, UTC-05:00)
I'm not sure why you had to go though all this trouble.
You can just go here:
http://lab.msdn.microsoft.com/express/maninstall/
for the manual installation instructions.
I guess the problem with that is you have to download a big file that has sql, etc. in it.
rich
Name
E-mail
Home page

Comment (Some html is allowed: a@href@title, strike) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview