最近在给一套价值1800多万的实验系统编写软件,采用了.NET 3.5(C#)架构,在部署的过程中遇到了点小问题,实验室的主机均只有内部网络,并且与外部隔离,而.NET 3.5运行环境需要联网才能安装成功。
在网上找了好多资料,发现有的人说行,有的人说不行。我在虚拟机上实验了一下,结论是:无法的联网的主机基本上很不容易部署.NET 3.5环境,不仅3.5如此,.NET 3.0也同样有这个问题。在安装的过程中要求联网,下载文件,虽然有可能只是少个2M的文件(.NET 3.5),但是却给安装造成了很大的麻烦。微软官方提供的Microsoft .NET Framework 3.5 Service pack 1 (Full Package) - 简体中文也有这个问题。
经过查询发现,好多人的给出的解决方案是拿VS2008的安装程序(.NET 3.5 SP1还需要VS2008 SP1的安装光盘),不仅不容易携带,而且安装过程也比较漫长(虽然可以选择安装特定组件)。
根据这个思路,我今天通过实验找到了一个折中的解决方法。
去http://download.microsoft.com/download/3/0/2/3025eae6-2e15-4972-972a-f5b1ed248e85/VS2008ExpressWithSP1CHSX1504735.iso 下载Visual Studio 2008 Express 中文版 With SP1,文件大小略小于1G。打开镜像,考出文件夹VCSExpress。找到这两个文件:baseline.dat和vs_setup.pdi。
改写baseline.dat文件的内容为:
[Version] Signature="$Windows NT$" Provider="Microsoft Visual C# 2008 Express Edition with SP1 - CHS" Version=900.100.00 NullString=Null String BootstrapperURL=fwlink/?LinkId=119084 NewVersionURL=fwlink/?linkid=119091 Lang=2052 AdminModeSupported=0 [Display Pages] GFN_DPID Component Selection Page GFN_DPID Data Directory Page GFN_DPID Service Account Page GFN_DPID Summary Page [Complete Component List] GFN_MID IA64block GFN_MID Windows XP SP2 GFN_MID Win2k SP4 GFN_MID Windows 2003 Server Service Pack 2 GFN_MID Windows Installer 3.1 GFN_MID Internet Explorer 6.0 GFN_MID VC Redist GFN_MID NET Framework Setup GFN_MID NET Framework v3.5 GFN_MID NET Framework Setup x64 GFN_MID NET Framework v3.5 x64 GFN_MID NET Framework LP Setup x86 CHS GFN_MID NET Framework LP Setup x64 CHS GFN_Client_MSI GFN_MID BITS Service GFN_MID Windows Installer 4.5 x86 GFN_MID Windows Installer 4.5 2k3 x86 GFN_MID Windows Installer 4.5 x86 CBS GFN_MID Windows Installer 4.5 x64 GFN_MID Windows Installer 4.5 x64 CBS GFN_Reboot_Required_A [gencomp95] BlockorWarn=1 CleanCost=0 CommandLine=blocker.exe ComponentType=1 EncryptionOpt=0 EstInstallTime=0 GFN=GFN_MID IA64block InstallOnAMD64=0 InstallOnFutureNT=1 InstallOnVista=1 InstallOnLHS=1 InstallOnIA64=1 InstallOnNetServer=1 InstallOnWin2k=1 InstallOnWinNT4=1 InstallOnWinXP=1 InstallOnx86=0 LangSensitive=optional moduleid=2DC44996-6322-4ed5-8FCA-325575A19086 Reboot=0 RebootLaterOk=0 ReturnType=IeReturnCheck TextLink=IA64block_text.htm version guid=424617F7-53ED-4704-AF6A-4695973BED19 VersionCheck=RegDwordCheck [gencomp6] BlockorWarn=1 CleanCost=0 CommandLine=blocker.exe ComponentType=1 DetectKey=HKLM,System/CurrentControlSet/Control/Windows DetectKeyVal=CSDVersion DetectKeyValData=512 EncryptionOpt=0 EstInstallTime=0 Executable=sp.exe GFN=GFN_MID Windows XP SP2 HelpLink=windowsXPsp_help.htm IgnoreLaterVersions=0 InstallOnAMD64=1 InstallOnFutureNT=0 InstallOnVista=0 InstallOnLHS=0 InstallOnIA64=0 InstallOnNetServer=0 InstallOnWin2k=0 InstallOnWinNT4=0 InstallOnWinXP=1 InstallOnx86=1 LangSensitive=optional moduleid=DE5AC4FC-7307-4ac7-B683-9F4E324A9BB8 Reboot=0 RebootLaterOk=0 ReturnType=IeReturnCheck TextLink=windowsXPsp_text.htm version guid=4E041A7D-5234-471b-90D5-75E994D46197 version string=2.0 VersionCheck=RegDwordCheck [gencomp7] BlockorWarn=1 CleanCost=0 CommandLine=blocker.exe ComponentType=1 DetectKey=HKLM,System/CurrentControlSet/Control/Windows DetectKeyVal=CSDVersion DetectKeyValData=1024 EncryptionOpt=0 EstInstallTime=0 Executable=sp.exe GFN=GFN_MID Win2k SP4 HelpLink=windows2000sp_help.htm IgnoreLaterVersions=0 InstallOnAMD64=1 InstallOnFutureNT=0 InstallOnVista=0 InstallOnLHS=0 InstallOnIA64=1 InstallOnNetServer=0 InstallOnWin2k=1 InstallOnWinNT4=0 InstallOnWinXP=0 InstallOnx86=1 LangSensitive=optional moduleid=C32EA67E-6E85-4ba6-8F07-F476B01F6A46 Reboot=0 RebootLaterOk=0 ReturnType=IeReturnCheck TextLink=windows2000sp_text.htm version guid=3C8FD413-EE18-41ff-8486-FBA7F48570FC version string=2.0 VersionCheck=RegDwordCheck [gencomp4] BlockorWarn=1 CleanCost=0 CommandLine=blocker.exe ComponentType=1 DetectKey=HKLM,System/CurrentControlSet/Control/Windows DetectKeyVal=CSDVersion DetectKeyValData=512 EncryptionOpt=0 EstInstallTime=0 Executable=sp.exe GFN=GFN_MID Windows 2003 Server Service Pack 2 HelpLink=windows2003sp_help.htm IgnoreLaterVersions=0 InstallOnAMD64=1 InstallOnFutureNT=0 InstallOnVista=0 InstallOnLHS=0 InstallOnIA64=1 InstallOnNetServer=1 InstallOnWin2k=0 InstallOnWinNT4=0 InstallOnWinXP=0 InstallOnx86=1 LangSensitive=optional moduleid=e8b22deb-b624-4b7d-be30-c2c30497e229 Reboot=0 RebootLaterOk=0 ReturnType=IeReturnCheck TextLink=windows2003sp_text.htm version guid= version string=6.0 VersionCheck=FileRegVerCheck [gencomp90] CleanCost=11000000 CommandLine=/quiet /norestart ComponentType=1 DetectFile=[winsys]msi.dll DetectFileVersion=3.1.4000.2435 EncryptionOpt=0 EstInstallTime=21 Executable=WindowsInstaller-KB893803-v2-x86.exe FileSize=2585872 FileHash=69B61B2C00323CEA3686315617D0F452E205DAE10C47E02CBE1EA96FEA38F582 GFN=GFN_MID Windows Installer 3.1 IgnoreLaterVersions=0 InstallOnAMD64=0 InstallOnFutureNT=0 InstallOnVista=0 InstallOnLHS=0 InstallOnIA64=0 InstallOnNetServer=0 InstallOnWin2k=1 InstallOnWinNT4=0 InstallOnWinXP=1 InstallOnx86=1 LangSensitive=neutral moduleid=E921BEEA-6B5D-4f0f-BF78-4279F8032641 Reboot=0 RebootLaterOk=0 Repair=0 ReturnType=Win32ReturnCheck Uninstall=0 URL=fwlink/?LinkId=51430 version guid=49EA395D-F9D6-45f0-9E67-22AD90D56028 version string=3.1 VersionCheck=FileVersionCheck [gencomp13] BlockorWarn=1 CleanCost=125000000 CommandLine=/c:"ie6wzd.exe /Q:A /R:N /S:""#e""" ComponentType=1 DetectKey=HKLM,SOFTWARE/Microsoft/Internet Explorer DetectKeyVal=Version DetectKeyValData=6.0.2800.1106 EncryptionOpt=0 EstInstallTime=225 Executable=ie6setup.exe GFN=GFN_MID Internet Explorer 6.0 HelpLink=ie6sp_help.htm IgnoreLaterVersions=0 InstallOnAMD64=1 InstallOnFutureNT=0 InstallOnVista=0 InstallOnLHS=0 InstallOnIA64=1 InstallOnNetServer=1 InstallOnWin2k=1 InstallOnWinNT4=0 InstallOnWinXP=0 InstallOnx86=1 LangSensitive=optional moduleid=42B8BF38-A91C-48b6-8FD3-1BFCC50AD74C Reboot=1 RebootLaterOk=0 ReturnType=IeReturnCheck TextLink=ie6sp_text.htm version guid=4E041A7D-5234-471b-90D5-75E994D46197 version string=6.0 VersionCheck=FileRegVerCheck [gencomp329,{12CDA52C-7A8F-4785-8A22-53C87393FEE0}] ChangeablePath=0 CleanCost=10000000 CommandLine=VSEXTUI=1 BlockorWarn=0 ComponentType=1 DefaultPath=[ProgramFilesFolder]/VC/ GFN=GFN_MID VC Redist DetectKey= DetectKeyVal= DetectKeyValData= EncryptionOpt=0 EstInstallTime=180 Executable=vcredist_x86.exe FileHash=430B4B24A04A0210733747BD0BE6FBABA64435836498CC57E071B622DCCDE376 FileSize=4217864 IgnoreLaterVersions=0 InstallOnAMD64=1 InstallOnFutureNT=1 InstallOnVista=1 InstallOnLHS=1 InstallOnIA64=0 InstallOnNetServer=1 InstallOnWin2k=1 InstallOnWinNT4=0 InstallOnWinXP=1 InstallOnx86=1 LangSensitive=neutral MajorVersion=9 MinorVersion=0 moduleid=78C20453-8EF5-4A5E-BC23-50ABA97AD76E Reboot=0 RebootLaterOk=0 Repair=1 ReturnType=NetRtReturnCheck Uninstall=0 version guid=CD60C1A0-29D4-4F03-AA2B-0FA50B41DB1D version string=9.0 VersionCheck=MsiProductCheck InstallPackage=vc_red.msi LogFile=dd_VC_Red_MSI.txt URL=fwlink/?LinkId=119372 ProductCode={3C3D696B-0DB7-3C6D-A356-3DB8CE541918} UpgradeCode={AA783A14-A7A3-3D33-95F0-9A351D530011} ProductCode1={3C3D696B-0DB7-3C6D-A356-3DB8CE541918} ProductInstallStateOperator=or [gencomp350,{168D82F8-AC6B-4B55-804F-2AE51AC4BFDF}] ComponentType=1 GFN=GFN_MID NET Framework Setup CleanCost=300000000 CommandLine=/q /norestart /lang:CHS DefaultPath=[WindowsFolder]/Microsoft.NET/Framework/v3.5 DetectKey=HKLM,SOFTWARE/Microsoft/NET Framework Setup/NDP/v3.5 DetectKeyVal=Version DetectKeyValData=3.5.30729.01 EncryptionOpt=0 EstInstallTime=600 Executable=dotnetfx35setup.exe FileSize=4440576 FileVersion=3.5.30729.01 IgnoreLaterVersions=0 InstallOnAMD64=0 InstallOnFutureNT=0 InstallOnVista=0 InstallOnLHS=0 InstallOnIA64=0 InstallOnNetServer=1 InstallOnWin2k=1 InstallOnWinNT4=0 InstallOnWinXP=1 InstallOnx86=1 InstallPackage= LangSensitive=neutral LogFile=dd_NET_Framework35_Setup.txt ProductCode={8BDDF598-C105-334C-BD55-20DF15AD284F} Reboot=0 RebootLaterOk=1 Repair=1 ReturnType=NetRtReturnCheck Uninstall=0 UninstallCommandLine=/q /uninstall /norestart UninstallExe=%windir%/Microsoft.NET/Framework/v3.5/Microsoft .NET Framework 3.5/setup.exe version guid=82C58DF6-A22E-4E0C-BD52-4087A7BDC5F5 moduleid=A2271109-F10C-49FA-AB3D-A26A2F1E9895 version string=3.5 VersionCheck=FileRegVerCheck URL=fwlink/?LinkId=119354 [gencomp710,{168D82F8-AC6B-4B55-804F-2AE51AC4BFDF}] ComponentType=1 GFN=GFN_MID NET Framework v3.5 CleanCost=300000000 CommandLine=/q /norestart /lang:CHS DefaultPath=[WindowsFolder]/Microsoft.NET/Framework/v3.5 DetectKey=HKLM,SOFTWARE/Microsoft/NET Framework Setup/NDP/v3.5 DetectKeyVal=Version DetectKeyValData=3.5.30729.01 EncryptionOpt=0 EstInstallTime=2400 Executable=dotnetfx35setup.exe FileSize=3572000 FileVersion=3.5.30729.01 IgnoreLaterVersions=0 InstallOnAMD64=0 InstallOnFutureNT=1 InstallOnVista=1 InstallOnLHS=1 InstallOnIA64=0 InstallOnNetServer=0 InstallOnWin2k=0 InstallOnWinNT4=0 InstallOnWinXP=0 InstallOnx86=1 InstallPackage= LangSensitive=neutral LogFile=dd_NET_Framework35_Setup.txt ProductCode={8BDDF598-C105-334C-BD55-20DF15AD284F} Reboot=0 RebootLaterOk=1 Repair=1 ReturnType=NetRtReturnCheck Uninstall=0 UninstallCommandLine=/q /uninstall /norestart UninstallExe=%windir%/Microsoft.NET/Framework/v3.5/Microsoft .NET Framework 3.5/setup.exe version guid=31948AB0-291B-412C-94BA-374BDFD0C50F moduleid=A90CC3AA-EBCD-4B0F-A5CC-6A8C2AF3B6F3 version string=3.5 VersionCheck=FileRegVerCheck URL=fwlink/?LinkId=119354 [gencomp351,{168D82F8-AC6B-4B55-804F-2AE51AC4BFDF}] ComponentType=1 GFN=GFN_MID NET Framework Setup x64 CleanCost=300000000 CommandLine=/q /norestart /lang:CHS DefaultPath=[WindowsFolder]/Microsoft.NET/Framework/v3.5 DetectKey=HKLM,SOFTWARE/Microsoft/NET Framework Setup/NDP/v3.5 DetectKeyVal=Version DetectKeyValData=3.5.30729.01 EncryptionOpt=0 EstInstallTime=600 Executable=dotnetfx35setup.exe FileSize=4549632 FileVersion=3.5.30729.01 IgnoreLaterVersions=0 InstallOnAMD64=1 InstallOnFutureNT=0 InstallOnVista=0 InstallOnLHS=0 InstallOnIA64=0 InstallOnNetServer=1 InstallOnWin2k=1 InstallOnWinNT4=0 InstallOnWinXP=1 InstallOnx86=0 InstallPackage= LangSensitive=neutral LogFile=dd_NET_Framework35_Setup.txt ProductCode={8BDDF598-C105-334C-BD55-20DF15AD284F} Reboot=0 RebootLaterOk=1 Repair=1 ReturnType=NetRtReturnCheck Uninstall=0 UninstallCommandLine=/q /uninstall /norestart UninstallExe=%windir%/Microsoft.NET/Framework64/v3.5/Microsoft .NET Framework 3.5/setup.exe version guid=5BCD8F67-1CD3-49df-9C99-A0A639CA392B moduleid=F117099A-ED74-4438-90F4-9B1293D134B0 version string=3.5 VersionCheck=FileRegVerCheck URL=fwlink/?LinkId=119354 [gencomp711,{168D82F8-AC6B-4B55-804F-2AE51AC4BFDF}] ComponentType=1 GFN=GFN_MID NET Framework v3.5 x64 CleanCost=300000000 CommandLine=/q /norestart /lang:CHS DefaultPath=[WindowsFolder]/Microsoft.NET/Framework/v3.5 DetectKey=HKLM,SOFTWARE/Microsoft/NET Framework Setup/NDP/v3.5 DetectKeyVal=Version DetectKeyValData=3.5.30729.01 EncryptionOpt=0 EstInstallTime=2400 Executable=dotnetfx35setup.exe FileSize=3572000 FileVersion=3.5.30729.01 IgnoreLaterVersions=0 InstallOnAMD64=1 InstallOnFutureNT=1 InstallOnVista=1 InstallOnLHS=1 InstallOnIA64=0 InstallOnNetServer=0 InstallOnWin2k=0 InstallOnWinNT4=0 InstallOnWinXP=0 InstallOnx86=0 InstallPackage= LangSensitive=neutral LogFile=dd_NET_Framework35_Setup.txt ProductCode={8BDDF598-C105-334C-BD55-20DF15AD284F} Reboot=0 RebootLaterOk=1 Repair=1 ReturnType=NetRtReturnCheck Uninstall=0 UninstallCommandLine=/q /uninstall /norestart UninstallExe=%windir%/Microsoft.NET/Framework64/v3.5/Microsoft .NET Framework 3.5/setup.exe version guid=B934943A-5550-4E37-899F-8227109163C5 moduleid=BB3E12D5-9BD6-489D-B761-925F383A9508 version string=3.5 VersionCheck=FileRegVerCheck URL=fwlink/?LinkId=119354 [gencomp7052052,{168D82F8-AC6B-4B55-804F-2AE51AC4BFDF}] ComponentType=3 HiddenFeature=1 GFN=GFN_MID NET Framework LP Setup x86 CHS CleanCost=300000000 CommandLine=/q /norestart DetectKey=HKLM,SOFTWARE/Microsoft/NET Framework Setup/NDP/v3.5/2052 DetectKeyVal=Version DetectKeyValData=3.5.30729.01 EncryptionOpt=0 EstInstallTime=600 Executable=dotnetfx35langpack_x86zh-CHS.exe FileSize=11379712 FileVersion=3.5.30729.01 IgnoreLaterVersions=0 InstallOnAMD64=0 InstallOnFutureNT=0 InstallOnVista=1 InstallOnLHS=1 InstallOnIA64=0 InstallOnNetServer=1 InstallOnWin2k=0 InstallOnWinNT4=0 InstallOnWinXP=1 InstallOnx86=1 InstallPackage= LangSensitive=neutral LogFile=dd_NET_Framework35_LangPack_Setup.txt OkToSkipIfFilesNotFound=1 InstallOnRepair=1 ProductCode={54E51672-DC3D-3204-BBF9-3AAF25CFF8AE} Reboot=0 RebootLaterOk=1 Repair=1 MaintExecutable=Microsoft.NET/Framework/v3.5/Microsoft .NET Framework 3.5 Language Pack SP1 - chs/setup.exe RepairCommandLine=/q /f /norestart ReturnType=NetRtReturnCheck Uninstall=0 UninstallCommandLine=/q /uninstall /norestart UninstallExe=%windir%/Microsoft.NET/Framework/v3.5/Microsoft .NET Framework 3.5 Language Pack SP1 - chs/setup.exe version guid=B585096B-0AD1-498C-B8C9-4B4236322DB1 moduleid=27250088-BC23-450F-994F-6EAA6DDBA6FB version string=3.5 VersionCheck=FileRegVerCheck URL=fwlink/?LinkId=118146 [gencomp7062052,{168D82F8-AC6B-4B55-804F-2AE51AC4BFDF}] ComponentType=3 HiddenFeature=1 GFN=GFN_MID NET Framework LP Setup x64 CHS CleanCost=300000000 CommandLine=/q /norestart DetectKey=HKLM,SOFTWARE/Microsoft/NET Framework Setup/NDP/v3.5/2052 DetectKeyVal=Version DetectKeyValData=3.5.30729.01 EncryptionOpt=0 EstInstallTime=600 Executable=dotnetfx35langpack_x64zh-CHS.exe FileSize=15110144 FileVersion=3.5.30729.01 IgnoreLaterVersions=0 InstallOnAMD64=1 InstallOnFutureNT=0 InstallOnVista=1 InstallOnLHS=1 InstallOnIA64=0 InstallOnNetServer=1 InstallOnWin2k=0 InstallOnWinNT4=0 InstallOnWinXP=1 InstallOnx86=0 InstallPackage= LangSensitive=neutral LogFile=dd_NET_Framework35_LangPack_Setup_x64.txt OkToSkipIfFilesNotFound=1 InstallOnRepair=1 ProductCode={54E51672-DC3D-3204-BBF9-3AAF25CFF8AE} Reboot=0 RebootLaterOk=1 Repair=1 MaintExecutable=Microsoft.NET/Framework64/v3.5/Microsoft .NET Framework 3.5 Language Pack SP1 - chs/setup.exe RepairCommandLine=/q /f /norestart ReturnType=NetRtReturnCheck Uninstall=0 UninstallCommandLine=/q /uninstall /norestart UninstallExe=%windir%/Microsoft.NET/Framework64/v3.5/Microsoft .NET Framework 3.5 Language Pack SP1 - chs/setup.exe version guid=2466B0F0-57C1-432D-87DB-4CB205FE47D5 moduleid=A3134279-8F42-4E03-AB8B-2341E2AFBA81 version string=3.5 VersionCheck=FileRegVerCheck URL=fwlink/?LinkId=118151 [gencomp33] BlockorWarn=1 CleanCost=0 CommandLine=blocker.exe ComponentType=1 EncryptionOpt=0 EstInstallTime=0 Executable= GFN=GFN_MID BITS Service HelpLink=Troubleshoot_Guide.htm IgnoreLaterVersions=1 InstallOnAMD64=1 InstallOnFutureNT=1 InstallOnVista=1 InstallOnLHS=1 InstallOnIA64=1 InstallOnNetServer=1 InstallOnWin2k=1 InstallOnWinNT4=1 InstallOnWinXP=1 InstallOnx86=1 LangSensitive=optional moduleid=94D46FD1-FB11-48be-9FDA-DD8389E94227 Reboot=0 RebootLaterOk=0 ReturnType=NetRtReturnCheck TextLink=BITS_Text.htm VersionCheck=BitsCheck [gencomp22] CleanCost=11000000 CommandLine=/quiet /norestart /log:"%TEMP%/dd_MSI45_log.txt" ComponentType=3 HiddenFeature=yes DetectFile=[winsys]msi.dll DetectFileVersion=4.5.6001.22159 EncryptionOpt=0 EstInstallTime=21 Executable=WindowsXP-KB942288-v3-x86.exe FileSize=3327000 FileHash=ACD589B57ED104B5E04A7CE28DC166654C09060C9C31AE8E2C9301FA098BBFA5 GFN=GFN_MID Windows Installer 4.5 x86 IgnoreLaterVersions=0 InstallOnAMD64=0 InstallOnFutureNT=0 InstallOnVista=0 InstallOnLHS=0 InstallOnIA64=0 InstallOnNetServer=0 InstallOnWin2k=0 InstallOnWinNT4=0 InstallOnWinXP=1 InstallOnx86=1 LangSensitive=neutral moduleid=12FA7B92-2997-4386-A73F-3EBE2B694F13 Reboot=1 RebootLaterOk=0 ReturnType=NetRtReturnCheck Uninstall=0 URL=fwlink/?LinkId=118633 version guid=ECC96D2E-6F40-4C88-AEDC-1267F017D082 version string=4.5 VersionCheck=FileVersionCheck DefaultSelected=0 WebDefaultSelected=0 [gencomp32] CleanCost=11000000 CommandLine=/quiet /norestart /log:"%TEMP%/dd_MSI45_log.txt" ComponentType=3 HiddenFeature=yes DetectFile=[winsys]msi.dll DetectFileVersion=4.5.6001.22159 EncryptionOpt=0 EstInstallTime=21 Executable=WindowsServer2003-KB942288-v4-x86.exe FileSize=3071512 FileHash=763E0FFF2F0B4413C1A51B7016EA1B5E4AE5768D0593DFEDF285DDC26CF18137 GFN=GFN_MID Windows Installer 4.5 2k3 x86 IgnoreLaterVersions=0 InstallOnAMD64=0 InstallOnFutureNT=0 InstallOnVista=0 InstallOnLHS=0 InstallOnIA64=0 InstallOnNetServer=1 InstallOnWin2k=0 InstallOnWinNT4=0 InstallOnWinXP=0 InstallOnx86=1 LangSensitive=neutral moduleid=DBEF1549-83E6-4854-9FE6-E87D19135F10 Reboot=1 RebootLaterOk=0 ReturnType=NetRtReturnCheck Uninstall=0 URL=fwlink/?LinkId=119115 version guid=FBD06E15-9248-4A8B-94A4-372C8B737939 version string=4.5 VersionCheck=FileVersionCheck DefaultSelected=0 WebDefaultSelected=0 [gencomp23,{61040379-156D-4ECE-B126-EA395A3B2AC7}] CleanCost=11000000 CommandLine=/passive /norestart ComponentType=3 HiddenFeature=yes DetectFile=[winsys]msi.dll DetectFileVersion=4.5.6000.20817 EncryptionOpt=0 EstInstallTime=21 Executable=Windows6.0-KB942288-v2-x86.msu FileSize=1768236 FileHash=8A8117A2BA0AB9261675557D1A4C33406A39E2D0620BD975E6709BA9AEAD4696 GFN=GFN_MID Windows Installer 4.5 x86 CBS IgnoreLaterVersions=0 InstallOnAMD64=0 InstallOnFutureNT=0 InstallOnVista=1 InstallOnLHS=1 InstallOnIA64=0 InstallOnNetServer=0 InstallOnWin2k=0 InstallOnWinNT4=0 InstallOnWinXP=0 InstallOnx86=1 LangSensitive=neutral moduleid=63F89145-C62B-48AA-9CDE-8D0B51F43E33 Reboot=1 RebootLaterOk=0 ReturnType=NetRtReturnCheck Uninstall=0 URL=fwlink/?LinkId=118634 version guid=01CC0A35-D5A8-4155-B8EC-83DA1AC3C428 version string=4.5 VersionCheck=FileVersionCheck DefaultSelected=0 WebDefaultSelected=0 [gencomp24] CleanCost=11000000 CommandLine=/quiet /norestart /log:"%TEMP%/dd_MSI45_log.txt" ComponentType=3 HiddenFeature=yes DetectFile=[syswow64]msi.dll DetectFileVersion=4.5.6001.22159 EncryptionOpt=0 EstInstallTime=21 Executable=WindowsServer2003-KB942288-v4-x64.exe FileSize=4691480 FileHash=0C7E2CD7394A99C9D7CC8B1BB575F476EC5E30F53E59A34077F848BF96AA6A3D GFN=GFN_MID Windows Installer 4.5 x64 IgnoreLaterVersions=0 InstallOnAMD64=1 InstallOnFutureNT=0 InstallOnVista=0 InstallOnLHS=0 InstallOnIA64=0 InstallOnNetServer=1 InstallOnWin2k=0 InstallOnWinNT4=0 InstallOnWinXP=1 InstallOnx86=0 LangSensitive=neutral moduleid=856F7EE8-CD8D-466F-916F-4EA9367D20C9 Reboot=1 RebootLaterOk=0 ReturnType=NetRtReturnCheck Uninstall=0 URL=fwlink/?LinkId=118636 version guid=C057B7CF-6F0F-4097-B46C-237BBF0BD46F version string=4.5 VersionCheck=FileVersionCheck DefaultSelected=0 WebDefaultSelected=0 [gencomp25,{61040379-156D-4ECE-B126-EA395A3B2AC7}] CleanCost=11000000 CommandLine=/passive /norestart ComponentType=3 HiddenFeature=yes DetectFile=[winsys]msi.dll DetectFileVersion=4.5.6000.20817 EncryptionOpt=0 EstInstallTime=21 Executable=Windows6.0-KB942288-v2-x64.msu FileSize=3086960 FileHash=596A20620D4623DF6A806048513DB67B37F151E668900BE405B6D2FDD1A31D2B GFN=GFN_MID Windows Installer 4.5 x64 CBS IgnoreLaterVersions=0 InstallOnAMD64=1 InstallOnFutureNT=0 InstallOnVista=1 InstallOnLHS=1 InstallOnIA64=0 InstallOnNetServer=0 InstallOnWin2k=0 InstallOnWinNT4=0 InstallOnWinXP=0 InstallOnx86=0 LangSensitive=neutral moduleid=40D5E8DA-22D6-4D87-A26A-85BD2BDFD494 Reboot=1 RebootLaterOk=0 ReturnType=NetRtReturnCheck Uninstall=0 URL=fwlink/?LinkId=118635 version guid=737D181A-25AE-4417-997A-A27A09478DC7 version string=4.5 VersionCheck=FileVersionCheck DefaultSelected=0 WebDefaultSelected=0 [gencomp50] BlockorWarn=0 CleanCost=0 CommandLine= ComponentType=3 EncryptionOpt=0 EstInstallTime=100 Executable=RebootCheck.exe FileSize=43008 GFN=GFN_Reboot_Required_A HiddenFeature=yes InstallOnAMD64=1 InstallOnFutureNT=0 InstallOnVista=1 InstallOnLHS=1 InstallOnIA64=0 InstallOnNetServer=0 InstallOnWin2k=0 InstallOnWinNT4=0 InstallOnWinXP=0 InstallOnx86=1 moduleid=8e53086a-04c9-47ca-99d0-4137175274b9 Reboot=0 RebootLaterOk=0 Repair=0 Uninstall=0 ReturnType=Win32ReturnCheck URL=fwlink/?LinkId=123015 VersionCheck=RegDwordCheck DetectKey=HKLM,SOFTWARE/Microsoft/VisualStudio/9.0/Setup DetectKeyVal=RebootCheck DetectKeyValData=1 version guid=980b4961-9eec-4eeb-a756-cea008743918 [VS Custom] DepCheckLogon=VSWCU OldMDAC=VSWCU
改写vs_setup.pdi文件内容为:
[Version] Signature="$Windows NT$" Provider="Microsoft Visual C# 2008 Express Edition with SP1 - CHS" Version=900.100.00 NullString=Null String Lang=2052 [Complete Component List] GFN_MID IA64block GFN_MID Windows XP SP2 GFN_MID Win2k SP4 GFN_MID Windows 2003 Server Service Pack 2 GFN_MID Windows Installer 3.1 GFN_MID Internet Explorer 6.0 GFN_MID VC Redist GFN_MID NET Framework Setup GFN_MID NET Framework v3.5 GFN_MID NET Framework Setup x64 GFN_MID NET Framework v3.5 x64 GFN_MID NET Framework LP Setup x86 CHS GFN_MID NET Framework LP Setup x64 CHS GFN_Client_MSI GFN_MID BITS Service GFN_MID Windows Installer 4.5 x86 GFN_MID Windows Installer 4.5 2k3 x86 GFN_MID Windows Installer 4.5 x86 CBS GFN_MID Windows Installer 4.5 x64 GFN_MID Windows Installer 4.5 x64 CBS GFN_Reboot_Required_A [Complete Dependency List] gencomp95 gencomp6 gencomp7 gencomp4 gencomp90 gencomp13 gencomp329,{12CDA52C-7A8F-4785-8A22-53C87393FEE0} gencomp350,{168D82F8-AC6B-4B55-804F-2AE51AC4BFDF} gencomp710,{168D82F8-AC6B-4B55-804F-2AE51AC4BFDF} gencomp351,{168D82F8-AC6B-4B55-804F-2AE51AC4BFDF} gencomp711,{168D82F8-AC6B-4B55-804F-2AE51AC4BFDF} gencomp7052052,{168D82F8-AC6B-4B55-804F-2AE51AC4BFDF} gencomp7062052,{168D82F8-AC6B-4B55-804F-2AE51AC4BFDF} gencomp33 gencomp22 gencomp32 gencomp23,{61040379-156D-4ECE-B126-EA395A3B2AC7} gencomp24 gencomp25,{61040379-156D-4ECE-B126-EA395A3B2AC7} gencomp50 [Microsoft Visual C# 2008 Express Edition with SP1 - CHS] gencomp95 gencomp6 gencomp7 gencomp4 gencomp90 gencomp13 gencomp329,{12CDA52C-7A8F-4785-8A22-53C87393FEE0} gencomp350,{168D82F8-AC6B-4B55-804F-2AE51AC4BFDF} gencomp710,{168D82F8-AC6B-4B55-804F-2AE51AC4BFDF} gencomp351,{168D82F8-AC6B-4B55-804F-2AE51AC4BFDF} gencomp711,{168D82F8-AC6B-4B55-804F-2AE51AC4BFDF} gencomp7052052,{168D82F8-AC6B-4B55-804F-2AE51AC4BFDF} gencomp7062052,{168D82F8-AC6B-4B55-804F-2AE51AC4BFDF} gencomp33 gencomp22 gencomp32 gencomp23,{61040379-156D-4ECE-B126-EA395A3B2AC7} gencomp24 gencomp25,{61040379-156D-4ECE-B126-EA395A3B2AC7} gencomp50
然后删除目录中的Ixpvcs.exe文件。
删除WSU目录下的:
RDBG
Silverlight
SMO
SSCE
SSE
WinSDK
这6个文件夹。
好的,这些步骤完成后,就达到我们的目的了,把剩下的所有文件存起来,用7Z打个包,文件大小在329M左右,比起VS2008任何版本的安装包都小的多,也方便携带。安装时只要运行autorun.exe就可以了。有一个小小的不足就是安装时的列表里仍然有Microsoft Visual C# 2008 Express Edition with SP1,在安装结束时会提示“Microsoft Visual C# 2008 Express Edition with SP1 - CHS 在安装期间遇到问题。安装没有正确完成。”,我们选择“不发送报告。”,最后提示:
下列组件安装成功:
Visual C++ 运行时系统必备
Microsoft .NET Framework 3.5 SP1
Microsoft .NET Framework 3.5LP - 简体中文
检查下系统,最终安装成功的文件是:
Microsoft .NET Framework 2.0 Service Pack 2
Microsoft .NET Framework 2.0 Service Pack 2 Language Pack -CHS
Microsoft .NET Framework 3.0 Service Pack 2
Microsoft .NET Framework 3.0 Service Pack 2 Language Pack -CHS
Microsoft .NET Framework 3.5 SP1
Microsoft .NET Framework 3.5 SP1 语言包 - 简体中文
Microsoft Visual C++ 2008 Redistributable - 86 9.0.30729
MSXML 6.0 Parser (KB933579)
基本上都是我们需要的文件。
如果有时间,想继续精简下。比如,现在的安装版本同时适合好多种平台(X86/X64/IA64),其实对一般的还是X86的使用较多,如果可以再细分的话,那么说需要携带的安装包将更小。不过目前330M的大小也基本上可以方便携带了,毕竟现在的U盘那么普及,而且容量也都不小。
提示:点击代码上方"view plain",直接拷贝覆盖原来文件即可。