InstallShield 2010集成 net Framework 4的安装包制作

分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow

也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!

               

InstallShield 2010中制作安装包时,对于集成.net Framework 4以前的版本,如3.5 sp1/3.5/3.0/2.0 sp2/2.0sp1/2.0等提供了现成的prq文件模板,可以直接使用。也可以参考前一篇文章的方法自己下载并修改。

http://blog.csdn.net/downmoon/archive/2010/02/27/5330935.aspx

前天下了最新的vs2010,一些程序升级到 .net Framework 4,在制作安装包时可以用vs自带的打包程序,也可以方便的制作。问题是以前制作的installshield模板弃之不用,有些可惜了,但Installshileld 2010下载的最新版sp1 with hotifx 52410并不包含对.net Framework 4对应的prq文件,于是照着前篇文章的方法制作了一个,文件名为Microsoft .NET Framework 4.0.Full.prq,内容如下:

  1. <?xml version="1.0" encoding="UTF-8"?>  
  2. <SetupPrereq>  
  3.     <conditions>  
  4.         <condition Type="2" Comparison="32" Path="HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/NET Framework Setup/NDP/v4/Full" FileName="Install" ReturnValue="1"></condition>  
  5.     </conditions>  
  6.     <operatingsystemconditions>  
  7.         <operatingsystemcondition MajorVersion="5" MinorVersion="1" PlatformId="2" CSDVersion="" Bits="1" ProductType="1" ServicePackMajorMin="2"></operatingsystemcondition>  
  8.         <operatingsystemcondition MajorVersion="5" MinorVersion="2" PlatformId="2" CSDVersion="" Bits="1" ProductType="2|3" ServicePackMajorMin="1"></operatingsystemcondition>  
  9.     </operatingsystemconditions>  
  10.     <files>  
  11.         <file LocalFile="<ISProductFolder>/SetupPrerequisites/Microsoft .net/4.0/dotNetFx40_Full_x86_x64.exe" URL="http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe" CheckSum="251743DFD3FDA414570524BAC9E55381" FileSize="0,50449456"></file>  
  12.     </files>  
  13.     <execute file="dotNetFx40_Full_x86_x64.exe" cmdline="/q /norestart" cmdlinesilent="/q /norestart" returncodetoreboot="1641,3010" requiresmsiengine="1"></execute>  
  14.     <properties Id="{0a391abd-25c1-4fc0-919f-b21f31ab88b7}" Description="This prerequisite installs the .net 4.0 framework for 32-bit (x86) systems." AltPrqURL="http://saturn.installshield.com/is/prerequisites/microsoft .net framework 4.0.prq"></properties>  
  15. </SetupPrereq>  
<?xml version="1.0" encoding="UTF-8"?><SetupPrereq>    <conditions>        <condition Type="2" Comparison="32" Path="HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/NET Framework Setup/NDP/v4/Full" FileName="Install" ReturnValue="1"></condition>    </conditions>    <operatingsystemconditions>        <operatingsystemcondition MajorVersion="5" MinorVersion="1" PlatformId="2" CSDVersion="" Bits="1" ProductType="1" ServicePackMajorMin="2"></operatingsystemcondition>        <operatingsystemcondition MajorVersion="5" MinorVersion="2" PlatformId="2" CSDVersion="" Bits="1" ProductType="2|3" ServicePackMajorMin="1"></operatingsystemcondition>    </operatingsystemconditions>    <files>        <file LocalFile="<ISProductFolder>/SetupPrerequisites/Microsoft .net/4.0/dotNetFx40_Full_x86_x64.exe" URL="http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe" CheckSum="251743DFD3FDA414570524BAC9E55381" FileSize="0,50449456"></file>    </files>    <execute file="dotNetFx40_Full_x86_x64.exe" cmdline="/q /norestart" cmdlinesilent="/q /norestart" returncodetoreboot="1641,3010" requiresmsiengine="1"></execute>    <properties Id="{0a391abd-25c1-4fc0-919f-b21f31ab88b7}" Description="This prerequisite installs the .net 4.0 framework for 32-bit (x86) systems." AltPrqURL="http://saturn.installshield.com/is/prerequisites/microsoft .net framework 4.0.prq"></properties></SetupPrereq>
 说明:

1、注册表中的检测位置:HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/NET Framework  Setup/NDP/v4/Full

2、文件的直接下载地址:http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe

3、exe文件位置:&lt;ISProductFolder&gt;/SetupPrerequisites/Microsoft   .net/4.0/dotNetFx40_Full_x86_x64.exe

4、MD5值:251743DFD3FDA414570524BAC9E55381(可以通过对该安装文件查询得知)

5、产品在安装系统中的GUID:(0a391abd-25c1-4fc0-919f-b21f31ab88b7这个在微软的官方网站下载页面的地址栏可以得知,我随便生成了一个GUID,只要保证在安装系统中不重复就可以了。

另外,.net Framework 4 和.net Framework 3.5类似,都采取可以完全部署和Client Profile两种方式。大小差不多,40多M左右。建议采用完全部署。
邀月工作室

 邀月工作室

 具体步骤:

第一步、如果不想在线下载.net Framework 4 ,可以用vs2010先做一个简单的部署安装程序, 按照是上图选项,则会在可执行程序的对应路径下生成一个dotNetFx40_Full_x86_x64.exe,当然也可以直接下载

http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe 

然后将这个文件复制到installshield2010的安装路径下/SetupPrerequisites/Microsoft .net/4.0/,如下图:

 邀月工作室

第二步:在installshield中选取Framework 4 即可。然后就可以生成包含Framework 4 的安装包了!
邀月工作室

 邀月工作室

邀月注:本文版权由邀月和CSDN共同所有,转载请注明出处。
助人等于自助!   [email protected]
           

给我老师的人工智能教程打call!http://blog.csdn.net/jiangjunshow

这里写图片描述

猜你喜欢

转载自blog.csdn.net/gfuugfdkkn/article/details/83957245
今日推荐