vs express 單獨離線包下載,離線安裝 Visual Studio Express 而不下載整個鏡像文件的方法

離線安裝 Visual Studio Express 而不下載整個鏡像文件的方法

       *原文地址:http://vicker313.wordpress.com/2008/11/26/

       *轉載本文請註明出處: http://blog.renren.com/blog/bp/QmN_0yuznf

       先上翻譯,原文在最後上。翻譯不是一字一句來的,稍作改進,這可是純人工勞動哦。

       “Microsoft Visual Studio Experss ”(VSE速成版)是Visual studio 的免費版本,保存了幾乎全部的編程功能,而體積卻遠遠小於正式版。現在微軟的官方網站上提供2008與2010版的在線安裝程序,而網絡上可以搜索到2005、2008與2010版本的安裝程序。我們有兩種方法來安裝它。

       第一種方法是在線安裝。我們需要選擇一種EXPRESS產品(如VB、C#、WEB DEVELOP)的安裝啓動程序,然後運行它。啓動程序會自動下載所需的安裝文件,然後將其安裝到電腦上。當我們在另一臺電腦上安裝VSE的時候,啓動程序將再次下載全部的安裝文件。

       另一種方法是離線安裝。我們必須下載一個包含全部EXPRESS產品和SQL數據庫的鏡像文件,但是包含全部產品的鏡像文件大於700MB(不能放入一張CD之中)。

       如果我沒有因特網,而且只想安裝C#而不需要VB及其他東東。而我從來沒想過下載那個1GB的龐然大物,因爲我只用到它體積的10%的文件。但是現在 除了個別的產品(如VC#2005)之外,微軟沒有提供單個產品的離線安裝文件。天無絕人之路,我們可以研究研究那個在線安裝啓動程序,來獲得一個可以使用的離線安裝包。

      1.下載我們需要的EXPRESS產品的在線安裝啓動程序,然後用winrar來將其解壓到一個文件夾中。

      2.在這個文件夾中,我們找到文件“baseline.dat”,用記事本程序打開它。在記事本中,用查找功能,搜索“ [vs_setup.dll] ”。在 [vs_setup.dll] 開頭下的文字塊中,查找關鍵字“fwlink/?LinkId=”。然後複製    fwlink/?LinkId=xxxxx (xxxxx是一串數字),這其實是一個URL地址的後綴。

      3.打開瀏覽器,在地址欄輸入   go.microsoft.com/  ,接着將剛纔複製的字符串粘貼到後面,使地址成爲“  go.microsoft.com/fwlink/?LinkId=xxxxx  ”。按下回車,瀏覽器將自動下載一個程序,大概在60MB左右。這其實就是我們需要的EXPRESS產品離線安裝包。

      4.下載了這個程序之後,我們再用winrar將其解壓到另一個目錄中。其中會有一個名爲“vs_setup.msi ” 的文件,但我們並不能直接運行它。怎麼辦?先在此目錄中建立一個文本文檔,輸入  msiexec /i vs_setup.msi vsextui=1 addlocal=all reboot=reallysuppress    ,保存退出,再將這個文本文檔重命名爲“setup.bat”(系統隱藏擴展名的同志們可要注意了啊)。然後運行setup.bat,程序就開始安裝了。

       爲什麼不能直接運行“vs_setup.msi ”呢?正如錯誤提示所說,必須由安裝啓動程序中的“setup.exe”引導運行纔可以。而命令行中的“ vsextui=1 ”,就是運行“vs_setup.msi ”的關鍵,這讓其誤以爲是由“setup.exe”啓動的。

       然而對於VSE 2005的產品來說,步驟稍有不同。我們可以讓安裝啓動程序和離線安裝包解壓到同一目錄,這樣直接運行“setup.exe”,就可以完成安裝。

       這就是離線安裝 VSE 的方法,我們可以用它安裝VSE中的任何產品,像Web Developer 2005, Web Developer 2008 和 C# 2008 等等。

       譯者注:經驗證,VSE 2010版不能使用此方法。首次使用 .net 的XP系統、使用C++編程以及需要使用數據庫的同志們可要注意了啊,此離線安裝包只能安裝 Visual Studio Experss 主程序沒有.net framework 、 Windows SDK  SQL 數據庫 等組件。需要你多留個心眼。

 

      好了,原文如下:

     November 26, 2008

    How to offline install Visual Studio Express without download the whole image file                                                                                                                           — 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.

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章