您的位置:首页 > 其它

[摘]Visual Studio 2005的SP1的整合制作及其问题注释

2007-12-15 10:21 513 查看
Visual Studio 2005的SP1补丁已经发行一阵子了,大家应该都已经打上这个补丁了吧.但是每次在安装visual studio 2005就已经需要很长的时间了,再一打补丁,好家伙,需要的时间更长,有没有好方法让我们象当年整合window2000的SP补丁一样把VS2005 SP1补丁也整合到安装文件里呢?这样在以后安装就能节省很多的时间了.有的!

http://blogs.msdn.com/heaths/archive/2006/12/16/slipstreaming-visual-studio-2005-service-pack-1.aspx 看到整合方法如下

首先,需要大于3G的硬盘空间(解压VS2005用,实际感觉大概需要4~5G,因为后面应用补丁的时候还会占用空间),这个补丁只会应用到VS2005上,和我们的MSND是没有什么关系的.

1.解压VS2005.

首先需要把我们VS2005安装光盘内的安装文件解压在我们的硬盘上.使用如下命令:

msiexec.exe /a G:/VS/vs_setup.msi TARGETDIR=D:/VSSETUP /L*vx install.log

注:此命令可直接复制使用,但应注意文件路径。

其中G:/VS/vs_setup.msi  G:是我的光驱盘符,这个目录是我光盘的VS2005安装文件的路径.

TARGETDIR=D:/VSSETUP 这个是指定你要解压到的位置,我指定了D:/VSSETUP 这个目录,大概5分钟左右,解压出了3.11G的文件.

注:简体中文专业版的VS2005解压出大约2.4G的文件,其中不包括MSDN,VS2005 SP1并不作用在MSDN上。

2.释放补丁包.

把我们下载到的补丁文件解压出来.使用如下命令:

VS80sp1-KB926604-X86-CHS.exe /extract "E:/vspatch/"

注:此命令可直接复制使用,但应注意文件路径。

E:/vspatch/ 是我解压到的目录.解压出一个VS80sp1-KB926604-X86-CHS.msp的文件,注意,是以msp为后缀名.

注:简体中文补丁包的下载位置为 http://download.microsoft.com/download/8/0/7/8071514d-9370-45c3-8af1-4ff09a70e59d/VS80sp1-KB926604-X86-CHS.exe

3.应用补丁.

把我们解压出来的两个文件进行整合,使用如下命令:

msiexec.exe /a D:/VSSETUP/vs_setup.msi /p "E:/vspatch/VS80sp1-KB926604-X86-CHS.msp" /L*vx patch.log

注:此命令可直接复制使用,但应注意文件路径。

剩下的就是漫长的等待了,花费的时间大概和你安装好VS2005应用补丁的时间差不多吧.

打完补丁以后,把你VS安装目录(安装目录是指光盘的安装文件的目录,比如我的是G:/VS/)里的其他文件拷到D:/VSSSETUP里来了,但是,不要覆盖任何文件,还有.cab的压缩包也不用再拷了,刚才其实已经把cab里的东西在第一步的时候解压出来并应用补丁了.

注:所有以CAB为扩展名的文件都不需要再拷贝出来,只把原来的目录里的文件夹拷贝出来,你可能需要逐个文件夹核对,只把不存在的文件拷贝到相应的文件夹下。不要覆盖任何文件。

现在,可以把这个应用补丁的版本重新做成一张你的VS2005(SP1)安装光盘了,下次进行VS2005的安装可省事了。

注:

从 CD 安装 Visual Studio 2005 失败。请求网络安装。
装有 Visual Studio 2005 的媒体可能已损坏,因此无法成功安装。

解决此问题的方法

除了从 CD 或 DVD 运行以外,Visual Studio 2005 安装程序还可以从网络共享中运行。以下过程说明如何准备从网络共享安装 Visual Studio 2005。虽然该过程提到的是 Visual Studio 2005 CD,但其步骤与 DVD 相同。

1) 在服务器上创建一个文件夹(例如 VS2005)。
2) 在顶层文件夹中创建两个子文件夹,分别叫做 VS 和 MSDN。例如:
VS2005/VS
VS2005/MSDN。

3) 将 Visual Studio 2005 CD 的内容复制到 VS2005/VS 文件夹中。如果系统提示您是否改写任何现有文件,请选择“是”。
4) 将标记为“MSDN Library for Visual Studio 2005”的所有 CD 的内容复制到 MSDN 子文件夹。如果系统提示您是否改写任何现有文件,请选择“是”。

作者: wangqiang1588 2007-3-25 23:36   回复此发言

2 Visual Studio 2005的SP1的整合制作及其问题注释
5) 使用文本编辑器(如“记事本”)打开 VS 子文件夹中的 Setup.ini。
6) 在 [Documentation] 节中,对以“DIR=”开头的行进行以下更改:
[Documentation]
DIR=../MSDN

7) 保存所做的更改,然后关闭该文件。
注意:完成此步骤可防止安装过程中出现要求更换光盘的情况,并可将 MSDN Library CD 的正确路径通知给安装程序。

8) 在 VS 子文件夹中,打开 Setup 文件夹。
9) 在文本编辑器(如“记事本”)中打开 setup.sdb,然后在文件的末尾添加下面几行:
[Product Key]
XXXXXXXXXXXXXXXXXXXXXXXXX
注意:XXXXXXXXXXXXXXXXXXXXXXXXX 是 25 位产品密钥,输入时不能带短划线,您可以在 CD 包装上找到该产品密钥。

10) 保存所做的更改,然后关闭该文件。
注意:完成此步骤可以为要从网络共享安装的用户预先填写产品密钥。

11) 在网络上共享 VS2005 文件夹并进行相应的安全设置。网络上 Visual Studio 2005 安装程序的路径的形式为 //[服务器名]/VS2005/VS/setup.exe

注意:如果任何路径和文件名的组合超过 260 个字符,安装将会失败。Visual Studio 中路径的最大长度为 221 个字符。应将文件复制到一个长度少于 70 个字符的路径上。如果要为网络映像创建网络共享,则根安装位置的 UNC 路径所包含的字符应少于 39 个。

注意:如果此路径中的文件夹名称包括嵌入的空格,则安装可能会失败,例如:
//[服务器名]/VS2005/MSDN/
//[服务器名]/VS2005/Visual Studio/

注:在制作安装光盘镜像前,应检查VS 子文件夹中的 Setup.ini 的 [Documentation] 节中,对以“DIR=”开头的行是否为

[Documentation]
DIR=../MSDN

如果是,那末你制作的镜像在安装过程中会发生找不到光盘文件的问题,请修改会原来的样子。至于原来是什么样子的,我没见过,还希望你自己去查。

其他在安装过程中的问题,请在VS目录下的readme.htm中查找,其中有详细的说明。

以下附上http://blogs.msdn.com/heaths/archive/2006/12/16/slipstreaming-visual-studio-2005-service-pack-1.aspx的英文原版,请自行参考。

Slipstreaming Visual Studio 2005 Service Pack 1

Now that Visual Studio 2005 Service Pack 1 is released, some are wondering how to slipstream the patch so they can install Visual Studio 2005 with SP1 already applied. Much of this process is standard practice for Windows Installer packages.

Please note this will require a lot of disk space, as you’re unpacking around 3 GB – and more, if you add the MSDN installation, though that is not patched in this service pack – just for the product installation.

1. Install the Product

You must create an administrative image of Visual Studio 2005 in order to slipstream the service pack in that way. Installing the patch while installing the product – though a supported scenario with Windows Installer – is not supported in our patches currently because of how actions are conditioned, a more general problem I’ll discuss in a future post.

Assume D: is your CD or DVD drive letter, and //server/share is a path with space available all licensed users can access.

msiexec.exe /a D:/vs_setup.msi TARGETDIR=//server/share /L*vx install.log

2. Unpack the Patch

The patch you download for service pack 1 is a wrapper around the .msp file, so you must unpack the .msp file using the patch-standard /extract switch. Assuming you made an administrative installation of Team Suite, the main Visual Studio 2005 SP1 is used below:

作者: wangqiang1588 2007-3-25 23:36   回复此发言

3 Visual Studio 2005的SP1的整合制作及其问题注释

VS80sp1-KB926601-X86-ENU.exe /extract “%TMP%”

3. Apply the Patch

Now that you have the .msp file extracted, you must apply it to the administrative installation from step 1.

msiexec.exe /a //server/share/vs_setup.msi /p “%TMP%/VS80sp1-KB926601-X86-ENU.msp” /L*vx patch.log

4. Installing the Patched Product

The official deployment strategy for Visual Studio 2005 network installations can be found in KB907759. Copy the contents of the CD or DVD to the same directory – like //server/share in the example above – but do not replace any files. You really don’t need to copy the CAB files in the root directory, either. All those files have been expanded into source directories. This step is to copy the bootstrap files and other required components to the installation directory. After copying is complete, run setup.exe as normal.

Notes

Because when Windows Installer installs a patch to an administrative image, the identity of the patch is essentially lost (the #transform is not persisted, which contains information about how to apply the patch) the service pack is not uninstallable when you install the slipstreamed installation you just created. The entry in Add/Remove Programs (ARP) was written in lieu of having ARP discover the patch, but without an UninstallString registry value for the patch because the patch doesn’t actually exist and can’t be uninstalled.

This is also an expanded form of the installation, with all files loose in their source directory structure. If someone were to write a tool to repackage this, such a tool would have to – based on the Media table, attributes in the File table, and Word Count summary property as described in File Sequencing and How Files are Located – re-CAB some files and embed some of those CAB files back into the .msi file, then reset the administrative image bit (bit 2) in the Word Count summary property.

Published Saturday, December 16, 2006 7:45 AM by Heath Stewart
Filed under: Installation, VS 2005 SP1

作者: wangqiang1588 2007-3-25 23:36   回复此发言

4 mht和mhtml文件图标无法更改的问题
在安装IE 7.0以后由于由于某种原因导致mht和mhtml文件图标变为某种不同的图标,并且不能更改.具体的可能原因如下:
   发生问题的注册表项:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT/CLSID/{42042206-2D85-11D3-8CFF-005004838597}/Old Icon]

[HKEY_CLASSES_ROOT/CLSID/{42042206-2D85-11D3-8CFF-005004838597}/Old Icon/htmlfile]

[HKEY_CLASSES_ROOT/CLSID/{42042206-2D85-11D3-8CFF-005004838597}/Old Icon/htmlfile/DefaultIcon]
@="C://Program Files//Internet Explorer//IEXPLORE.EXE,-17"

[HKEY_CLASSES_ROOT/CLSID/{42042206-2D85-11D3-8CFF-005004838597}/Old Icon/mhtmlfile]

[HKEY_CLASSES_ROOT/CLSID/{42042206-2D85-11D3-8CFF-005004838597}/Old Icon/mhtmlfile/DefaultIcon]
@="C://Program Files//Internet Explorer//IEXPLORE.EXE,-32554"

修改后的注册表:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT/CLSID/{42042206-2D85-11D3-8CFF-005004838597}/Old Icon]

[HKEY_CLASSES_ROOT/CLSID/{42042206-2D85-11D3-8CFF-005004838597}/Old Icon/htmlfile]

[HKEY_CLASSES_ROOT/CLSID/{42042206-2D85-11D3-8CFF-005004838597}/Old Icon/htmlfile/DefaultIcon]
@="%ProgramFiles%//Internet Explorer//iexplore.exe,-17"

[HKEY_CLASSES_ROOT/CLSID/{42042206-2D85-11D3-8CFF-005004838597}/Old Icon/mhtmlfile]

[HKEY_CLASSES_ROOT/CLSID/{42042206-2D85-11D3-8CFF-005004838597}/Old Icon/mhtmlfile/DefaultIcon]
@="%ProgramFiles%//Internet Explorer//iexplore.exe,22"
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: