MyException - 我的异常网
当前位置:我的异常网» C# » Visual Studio 2010 集成 SP1 补丁 制造 Visual Stu

Visual Studio 2010 集成 SP1 补丁 制造 Visual Studio 2010 Service Pack 1 完整版安装光盘的方法

www.MyException.Cn  网友分享于:2013-10-22  浏览:0次
Visual Studio 2010 集成 SP1 补丁 制作 Visual Studio 2010 Service Pack 1 完整版安装光盘的方法

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 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

文章评论

为什么程序员都是夜猫子
为什么程序员都是夜猫子
总结2014中国互联网十大段子
总结2014中国互联网十大段子
程序员必看的十大电影
程序员必看的十大电影
不懂技术不要对懂技术的人说这很容易实现
不懂技术不要对懂技术的人说这很容易实现
“肮脏的”IT工作排行榜
“肮脏的”IT工作排行榜
程序员都该阅读的书
程序员都该阅读的书
程序员最害怕的5件事 你中招了吗?
程序员最害怕的5件事 你中招了吗?
Web开发人员为什么越来越懒了?
Web开发人员为什么越来越懒了?
看13位CEO、创始人和高管如何提高工作效率
看13位CEO、创始人和高管如何提高工作效率
Google伦敦新总部 犹如星级庄园
Google伦敦新总部 犹如星级庄园
 程序员的样子
程序员的样子
为啥Android手机总会越用越慢?
为啥Android手机总会越用越慢?
程序员和编码员之间的区别
程序员和编码员之间的区别
编程语言是女人
编程语言是女人
程序员眼里IE浏览器是什么样的
程序员眼里IE浏览器是什么样的
Java 与 .NET 的平台发展之争
Java 与 .NET 的平台发展之争
我跳槽是因为他们的显示器更大
我跳槽是因为他们的显示器更大
初级 vs 高级开发者 哪个性价比更高?
初级 vs 高级开发者 哪个性价比更高?
10个调试和排错的小建议
10个调试和排错的小建议
程序员周末都喜欢做什么?
程序员周末都喜欢做什么?
中美印日四国程序员比较
中美印日四国程序员比较
亲爱的项目经理,我恨你
亲爱的项目经理,我恨你
2013年美国开发者薪资调查报告
2013年美国开发者薪资调查报告
60个开发者不容错过的免费资源库
60个开发者不容错过的免费资源库
Java程序员必看电影
Java程序员必看电影
十大编程算法助程序员走上高手之路
十大编程算法助程序员走上高手之路
程序员的鄙视链
程序员的鄙视链
老美怎么看待阿里赴美上市
老美怎么看待阿里赴美上市
程序猿的崛起——Growth Hacker
程序猿的崛起——Growth Hacker
鲜为人知的编程真相
鲜为人知的编程真相
做程序猿的老婆应该注意的一些事情
做程序猿的老婆应该注意的一些事情
什么才是优秀的用户界面设计
什么才是优秀的用户界面设计
5款最佳正则表达式编辑调试器
5款最佳正则表达式编辑调试器
旅行,写作,编程
旅行,写作,编程
科技史上最臭名昭著的13大罪犯
科技史上最臭名昭著的13大罪犯
Web开发者需具备的8个好习惯
Web开发者需具备的8个好习惯
一个程序员的时间管理
一个程序员的时间管理
如何成为一名黑客
如何成为一名黑客
程序员应该关注的一些事儿
程序员应该关注的一些事儿
团队中“技术大拿”并非越多越好
团队中“技术大拿”并非越多越好
每天工作4小时的程序员
每天工作4小时的程序员
要嫁就嫁程序猿—钱多话少死的早
要嫁就嫁程序猿—钱多话少死的早
10个帮程序员减压放松的网站
10个帮程序员减压放松的网站
当下全球最炙手可热的八位少年创业者
当下全球最炙手可热的八位少年创业者
代码女神横空出世
代码女神横空出世
那些性感的让人尖叫的程序员
那些性感的让人尖叫的程序员
如何区分一个程序员是“老手“还是“新手“?
如何区分一个程序员是“老手“还是“新手“?
写给自己也写给你 自己到底该何去何从
写给自己也写给你 自己到底该何去何从
程序员的一天:一寸光阴一寸金
程序员的一天:一寸光阴一寸金
软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有