Visual Studio 2010 集成 SP1 補丁 製作 Visual Studio 2010 Service Pack 1 完整版安裝光碟的方法

来源:http://www.cnblogs.com/VAllen/archive/2017/09/06/installing-visual-studio-2010-rtm-and-service-pack-1-together.html
-Advertisement-
Play Games

Now that Visual Studio 2010 SP1 has been released, administrators and developers may wish to install both RTM and SP1 together for a seamless experien ...


Now that Visual Studio 2010 SP1 has been released, administrators and developers may wish to install both RTM and SP1 together for a seamless experience. With the release of VS2010 RTM we already published the Visual Studio Administrator Guide that documents a lot of the instructions I’ll utilize below. I encourage you to review that before proceeding with the following instructions, particularly how to avoid restarts during setup by pre-installing certain packages like Windows Installer 4.5 and .NET Framework 4.0.

How to: Create and run an unattended Visual Studio with SP1 setup

You’ll create a distribution point that will contain both Visual Studio 2010 RTM and SP1. This will work for existing installations of VS 2010 since setup will simply repair the product if it’s already installed. This has the added benefit that if any files are missing from the target machine, they should be reinstalled without a prompt for source during the SP1 install.

Creating a network or local image

First you’ll be creating copies of the Visual Studio 2010 RTM and SP1 installations that you can share out or install locally.

  1. Create a network or local image of Visual Studio setup as documented in How to: Create and Run an Unattended Visual Studio Setup.
    • You do not need to pre-populate the product key, but the developer will be prompted for it when first starting Visual Studio. Pre-populating the product key is recommended for administrators deploying to multiple machines through volume licensing.
    • You do not need to create an unattend.ini file if you want to install all features. Running setup.exe /q /norestart will install all features.
    • If you do want to create an unattend.ini file, run setup\setup.exe /createunattend <drive>:\VS2010\unattend.ini and not setup.exe in the root. You should run this on the same operating system platform and architecture that you want to target.
    • Creating the network or local image for Visual Studio 2010 documentation is also optional. SP1 will upgrade the Help Viewerregardless.
  2. Create a subdirectory under <drive>:\VS2010 or wherever you created the image from step 1 named “SP1”.
  3. Download Visual Studio 2010 Service Pack 1 and save to %TEMP% or any other location you like except in the directory you just created in step 2.
  4. Open a command prompt (you can open it elevated now, or confirm the elevation prompt when requested later) and change directories to where you saved the SP1 web installer in step 3.
  5. Run VS10sp1-KB983509.exe /createlayout <drive>:\VS2010\SP1 to download all packages to the directory you created in step 2.

Creating the unattend.bat file

Next you’ll be creating a batch install that will first install Visual Studio 2010 RTM followed by SP1. You can use any batch or scripting language you like so long as it is already supported on target machines. The example below uses the Windows batch language to make use of tokens like %~dp0 which provides the parent path to the batch script. This is handy in case you change the network or local image location in the future.

  1. Create a batch file named unattend.bat in the directory you created in step 1 and open it in notepad.exe or your favorite vanilla text editor.
  2. (Recommended) Add a simple check to determine if the batch script is processed in an elevated process. See the attached batch script for an example.
  3. Add the path to setup.exe in VS2010 with the following options.
    • Full install with no unattend.ini file: "%~dp0setup\setup.exe" /q /norestart
    • Custom install with unattend.ini file: "%~dp0setup\setup.exe" /q /norestart /unattendfile "%~dp0unattend.ini"
  4. (Optional) If you want to install Visual Studio 2010 documentation locally as documented in the Administrator Guide, add the command to HelpLibManager.exe next, ex: "%ProgramFiles%\Microsoft Help Viewer\v1.0\HelpLibManager.exe" /silent /product VS /version 100 /locale en-US /content "%ProgramData%\Microsoft\HelpLibrary" /sourceMedia "%~dp0ProductDocumentation\HelpContentSetup.msha"
  5. Add the path to setup.exe in VS2010\SP1 with the following option.
    • Restart after install (recommended): "%~dp0SP1\setup.exe" /q
    • Do not restart after install (Visual Studio or .NET Framework may not work until you do, but subsequent installs may work before rebooting): "%~dp0SP1\setup.exe" /q /norestart

You might consider adding some error processing for reboot return codes after each command. See the attached batch script for an example.

Running unattended setup

If you plan on deploying Visual Studio 2010 with SP1 over the network, you can share out the location you created above, ex: <drive>:\VS2010. As noted in the Administrator Guide, spaces in the share path may cause setup to fail so its best you avoid using spaces.

Since the batch file already passes the right options to the installers, the deployment scripts or developers can execute unattend.bat in an elevated command prompt directly.

How to: Deploy Visual Studio with SP1 using Microsoft System Configuration Manager (SCCM)

You’ll use the distribution point you created above to create or modify a package for SCCM to install Visual Studio 2010 RTM and SP1. You’ll follow the process documented in How to: Deploy Visual Studio Using Microsoft System Configuration Manager (SCCM) and add a program to the package after Visual Studio.

  1. Create the network image as documented above in the section “Creating a network or local image”.
  2. Follow the instructions in How to: Deploy Visual Studio Using Microsoft System Configuration Manager (SCCM) up till and including “Create a Program That has Setup and Installation Parameters for Visual Studio”.
  3. Create a program for the Visual Studio 2010 SP1 package.
    1. Right-click on Programs, point to New, and then click Program.
    2. On the General page, type a name for the package in the Name box, which in this example is “Visual Studio 2010 SP1 silent installation” (without quotes).
    3. In the Command line box, type: SP1\setup.exe /q /norestart
    4. In the Run list, select Hidden.
    5. In the After running list, verify that No action required is selected. Click Next, and then on the Requirements page click Nextagain.
    6. On the Environment page, in the Program can run list, select whether a user must be logged on. This will enable Run with administrative rights for the Run mode. Leave Drive mode set to Runs with UNC name, and then click Next.
    7. On the Advanced page, select Suppress program notifications. Also select Run another program first and then select the “Visual Studio 2010 Package” and the “Visual Studio 2010 silent installation” Program. Click Next.
    8. On the Windows Installer page, click Next.
    9. Click Next and then on the MOM Maintenance Mode page click Next again.
    10. To view the Summary page, click Next.
    11. To finish creating the new program, click Next, and then on the Wizard Completed page click Close.
  4. Continue the instructions in How to: Deploy Visual Studio Using Microsoft System Configuration Manager (SCCM) with “Select a Distribution Point”.

The documentation cited above from the Administrators Guide has a number of help links to more information about Active Directory and SCCM.

unattend.zip

PS:

不得不說現在 Visual Studio 2010 已經相當老舊,今年的 Visual Studio 2017 發佈已久,早已迭代了好幾個版本。

但有些情況下,還是需要用到 Visual Studio 2010 做開發,這是不得已的事情。

所以每次在新系統上安裝 Visual Studio 2010 完畢後,還要再裝載 SP1 ISO 鏡像並且安裝。

這很麻煩,網上又沒有集成版的安裝包,那到底能不能兩次安裝合併為一次,並且做到無人值守安裝呢,答案是可以的。

事實上,我更 傾向/喜歡 用 Visual Studio 2017 做開發,而且是越新越好。

嗯,我有強迫症...

 

轉載自:https://blogs.msdn.microsoft.com/heaths/2011/03/15/installing-visual-studio-2010-rtm-and-service-pack-1-together/

 

 

Now that Visual Studio 2010 SP1 has been released, administrators and developers may wish to install both RTM and SP1 together for a seamless experience. With the release of VS2010 RTM we already published the Visual Studio Administrator Guide that documents a lot of the instructions I’ll utilize below. I encourage you to review that before proceeding with the following instructions, particularly how to avoid restarts during setup by pre-installing certain packages like Windows Installer 4.5 and .NET Framework 4.0.

How to: Create and run an unattended Visual Studio with SP1 setup

You’ll create a distribution point that will contain both Visual Studio 2010 RTM and SP1. This will work for existing installations of VS 2010 since setup will simply repair the product if it’s already installed. This has the added benefit that if any files are missing from the target machine, they should be reinstalled without a prompt for source during the SP1 install.

Creating a network or local image

First you’ll be creating copies of the Visual Studio 2010 RTM and SP1 installations that you can share out or install locally.

  1. Create a network or local image of Visual Studio setup as documented in How to: Create and Run an Unattended Visual Studio Setup.
    • You do not need to pre-populate the product key, but the developer will be prompted for it when first starting Visual Studio. Pre-populating the product key is recommended for administrators deploying to multiple machines through volume licensing.
    • You do not need to create an unattend.ini file if you want to install all features. Running setup.exe /q /norestart will install all features.
    • If you do want to create an unattend.ini file, run setup\setup.exe /createunattend <drive>:\VS2010\unattend.ini and not setup.exe in the root. You should run this on the same operating system platform and architecture that you want to target.
    • Creating the network or local image for Visual Studio 2010 documentation is also optional. SP1 will upgrade the Help Viewerregardless.
  2. Create a subdirectory under <drive>:\VS2010 or wherever you created the image from step 1 named “SP1”.
  3. Download Visual Studio 2010 Service Pack 1 and save to %TEMP% or any other location you like except in the directory you just created in step 2.
  4. Open a command prompt (you can open it elevated now, or confirm the elevation prompt when requested later) and change directories to where you saved the SP1 web installer in step 3.
  5. Run VS10sp1-KB983509.exe /createlayout <drive>:\VS2010\SP1 to download all packages to the directory you created in step 2.

Creating the unattend.bat file

Next you’ll be creating a batch install that will first install Visual Studio 2010 RTM followed by SP1. You can use any batch or scripting language you like so long as it is already supported on target machines. The example below uses the Windows batch language to make use of tokens like %~dp0 which provides the parent path to the batch script. This is handy in case you change the network or local image location in the future.

  1. Create a batch file named unattend.bat in the directory you created in step 1 and open it in notepad.exe or your favorite vanilla text editor.
  2. (Recommended) Add a simple check to determine if the batch script is processed in an elevated process. See the attached batch script for an example.
  3. Add the path to setup.exe in VS2010 with the following options.
    • Full install with no unattend.ini file: "%~dp0setup\setup.exe" /q /norestart
    • Custom install with unattend.ini file: "%~dp0setup\setup.exe" /q /norestart /unattendfile "%~dp0unattend.ini"
  4. (Optional) If you want to install Visual Studio 2010 documentation locally as documented in the Administrator Guide, add the command to HelpLibManager.exe next, ex: "%ProgramFiles%\Microsoft Help Viewer\v1.0\HelpLibManager.exe" /silent /product VS /version 100 /locale en-US /content "%ProgramData%\Microsoft\HelpLibrary" /sourceMedia "%~dp0ProductDocumentation\HelpContentSetup.msha"
  5. Add the path to setup.exe in VS2010\SP1 with the following option.
    • Restart after install (recommended): "%~dp0SP1\setup.exe" /q
    • Do not restart after install (Visual Studio or .NET Framework may not work until you do, but subsequent installs may work before rebooting): "%~dp0SP1\setup.exe" /q /norestart

You might consider adding some error processing for reboot return codes after each command. See the attached batch script for an example.

Running unattended setup

If you plan on deploying Visual Studio 2010 with SP1 over the network, you can share out the location you created above, ex: <drive>:\VS2010. As noted in the Administrator Guide, spaces in the share path may cause setup to fail so its best you avoid using spaces.

Since the batch file already passes the right options to the installers, the deployment scripts or developers can execute unattend.bat in an elevated command prompt directly.

How to: Deploy Visual Studio with SP1 using Microsoft System Configuration Manager (SCCM)

You’ll use the distribution point you created above to create or modify a package for SCCM to install Visual Studio 2010 RTM and SP1. You’ll follow the process documented in How to: Deploy Visual Studio Using Microsoft System Configuration Manager (SCCM) and add a program to the package after Visual Studio.

  1. Create the network image as documented above in the section “Creating a network or local image”.
  2. Follow the instructions in How to: Deploy Visual Studio Using Microsoft System Configuration Manager (SCCM) up till and including “Create a Program That has Setup and Installation Parameters for Visual Studio”.
  3. Create a program for the Visual Studio 2010 SP1 package.
    1. Right-click on Programs, point to New, and then click Program.
    2. On the General page, type a name for the package in the Name box, which in this example is “Visual Studio 2010 SP1 silent installation” (without quotes).
    3. In the Command line box, type: SP1\setup.exe /q /norestart
    4. In the Run list, select Hidden.
    5. In the After running list, verify that No action required is selected. Click Next, and then on the Requirements page click Nextagain.
    6. On the Environment page, in the Program can run list, select whether a user must be logged on. This will enable Run with administrative rights for the Run mode. Leave Drive mode set to Runs with UNC name, and then click 
您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • Ubuntu安裝坑: 1、對於新手第一次安裝ubuntu,特殊情況會出現因為解析度問題導致安裝界面不全,無法進行下一步操作。 解決方案:使用alt+滑鼠左鍵拖動屏幕Linux文件名亂碼問題: 2、因為windows對於中文的編碼預設使用GBK,而linux系統上統一使用UTF-8進行編碼,這就導致大 ...
  • 回到目錄 對於業務層的程式的致命錯誤,我們一直的做法就是直接拋出指定的異常,讓程式去終斷,這種做法是對的,因為如果一個業務出現了致命的阻塞的問題,就沒有必要再向上一層一層的返回了,但這時有個問題,直接拋異常,意味著伺服器直接500了,前端如何去顯示,或者如果你是API的服務,如果為前端返回,如果是5 ...
  • 最近在學習百度的開源上傳組件WebUploader,上一篇文章,學習了批量文件上傳,今天學習一下批量圖片上傳,實際上與文件上傳很類似,只是添加了圖片顯示功能,這個功能WebUploader組件中已經提供了。 ...
  • 作為微軟下一代的開源的跨平臺的開發框架, Asp.net core 正在吸引越來越多的開發者基於其構建現代 web 應用。 目前, Azure App Service 也實現了對 asp.net core 的支持。 用戶所開發的 ASP.NET Core Web 應用, 以與通常 Asp.net W ...
  • 微信小程式給我們提供了一個很好的開發平臺,可以用於展現各種數據和實現豐富的功能,通過小程式的請求Web API 平臺獲取JSON數據後,可以在小程式界面上進行數據的動態展示。在數據的關鍵 一環中,我們設計和編寫Web API平臺是非常重要的,通過這個我們可以實現數據的集中控制和管理,本篇隨筆介紹基於... ...
  • 1.委托的典型用法 1.1定義一個委托: 1.2 定義一個MyClass類,放置一個滿足 AddDelegate委托要求的方法 1.3定義一個委托變數 1.4實例化一個MyClass對象,並將其 Add方法引用傳給委托變數del 1.5通過委托變數調用MyClass對象的 Add()方法 總結:定義 ...
  • 一、什麼是同步和非同步? 同步(英語:Synchronization),指對在一個系統中所發生的事件(event)之間進行協調,在時間上出現一致性與統一化的現象。說白了就是多個任務一個一個執行,同一時刻只有一個任務在執行。 非同步(英語:Asynchronization),指的是讓CPU暫時擱置當前請求 ...
  • 由於.Net MVC 5登陸和註冊方式有很多種,但是Identity方式去實現或許會更簡單更容易理解 首先新建一個項目 其次如下選擇Empty和MVC的選項 然後打開NuGet包管理器分別安裝幾個包 然後往Models文件夾裡面添加ApplicationUser類,SignInModel類,Sign ...
一周排行
    -Advertisement-
    Play Games
  • 移動開發(一):使用.NET MAUI開發第一個安卓APP 對於工作多年的C#程式員來說,近來想嘗試開發一款安卓APP,考慮了很久最終選擇使用.NET MAUI這個微軟官方的框架來嘗試體驗開發安卓APP,畢竟是使用Visual Studio開發工具,使用起來也比較的順手,結合微軟官方的教程進行了安卓 ...
  • 前言 QuestPDF 是一個開源 .NET 庫,用於生成 PDF 文檔。使用了C# Fluent API方式可簡化開發、減少錯誤並提高工作效率。利用它可以輕鬆生成 PDF 報告、發票、導出文件等。 項目介紹 QuestPDF 是一個革命性的開源 .NET 庫,它徹底改變了我們生成 PDF 文檔的方 ...
  • 項目地址 項目後端地址: https://github.com/ZyPLJ/ZYTteeHole 項目前端頁面地址: ZyPLJ/TreeHoleVue (github.com) https://github.com/ZyPLJ/TreeHoleVue 目前項目測試訪問地址: http://tree ...
  • 話不多說,直接開乾 一.下載 1.官方鏈接下載: https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads 2.在下載目錄中找到下麵這個小的安裝包 SQL2022-SSEI-Dev.exe,運行開始下載SQL server; 二. ...
  • 前言 隨著物聯網(IoT)技術的迅猛發展,MQTT(消息隊列遙測傳輸)協議憑藉其輕量級和高效性,已成為眾多物聯網應用的首選通信標準。 MQTTnet 作為一個高性能的 .NET 開源庫,為 .NET 平臺上的 MQTT 客戶端與伺服器開發提供了強大的支持。 本文將全面介紹 MQTTnet 的核心功能 ...
  • Serilog支持多種接收器用於日誌存儲,增強器用於添加屬性,LogContext管理動態屬性,支持多種輸出格式包括純文本、JSON及ExpressionTemplate。還提供了自定義格式化選項,適用於不同需求。 ...
  • 目錄簡介獲取 HTML 文檔解析 HTML 文檔測試參考文章 簡介 動態內容網站使用 JavaScript 腳本動態檢索和渲染數據,爬取信息時需要模擬瀏覽器行為,否則獲取到的源碼基本是空的。 本文使用的爬取步驟如下: 使用 Selenium 獲取渲染後的 HTML 文檔 使用 HtmlAgility ...
  • 1.前言 什麼是熱更新 游戲或者軟體更新時,無需重新下載客戶端進行安裝,而是在應用程式啟動的情況下,在內部進行資源或者代碼更新 Unity目前常用熱更新解決方案 HybridCLR,Xlua,ILRuntime等 Unity目前常用資源管理解決方案 AssetBundles,Addressable, ...
  • 本文章主要是在C# ASP.NET Core Web API框架實現向手機發送驗證碼簡訊功能。這裡我選擇是一個互億無線簡訊驗證碼平臺,其實像阿裡雲,騰訊雲上面也可以。 首先我們先去 互億無線 https://www.ihuyi.com/api/sms.html 去註冊一個賬號 註冊完成賬號後,它會送 ...
  • 通過以下方式可以高效,並保證數據同步的可靠性 1.API設計 使用RESTful設計,確保API端點明確,並使用適當的HTTP方法(如POST用於創建,PUT用於更新)。 設計清晰的請求和響應模型,以確保客戶端能夠理解預期格式。 2.數據驗證 在伺服器端進行嚴格的數據驗證,確保接收到的數據符合預期格 ...