因为一个项目需要进行简单的打包工作,问题在于必须一起打包VC运行库和.net framework 4.6.2。可最新(我所能搞到的)Install Shield也不支持.net Framework 4.6.2。在【程序安装器】--【应用程序数据】--【可再分发】找不到我想要的VC运行库和.net Framework版本。
通过FQgoogle(百度或许也有)找到了手工添加的方法。
.net Framework 4.6.2添加方法:将下列代码保存为文件名Microsoft .NET Framework 4.6.2 Full.prq放入安装路径C:\Program Files (x86)\InstallShield\2010\SetupPrerequisites
<?xml version="1.0" encoding="UTF-8"?> <SetupPrereq> <conditions> <condition Type="2" Comparison="2" Path="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" FileName="Release" ReturnValue="394802"></condition> </conditions> <operatingsystemconditions> <operatingsystemcondition MajorVersion="6" MinorVersion="1" PlatformId="2" CSDVersion="" ServicePackMajorMin="1"></operatingsystemcondition> <operatingsystemcondition MajorVersion="6" MinorVersion="2" PlatformId="2" CSDVersion=""></operatingsystemcondition> <operatingsystemcondition MajorVersion="6" MinorVersion="3" PlatformId="2" CSDVersion=""></operatingsystemcondition> <operatingsystemcondition MajorVersion="10" MinorVersion="0" PlatformId="2" CSDVersion=""></operatingsystemcondition> </operatingsystemconditions> <files> <file LocalFile="<ISProductFolder>\SetupPrerequisites\Microsoft.net\4.6\Full\NDP462-KB3151800-x86-x64-AllOS-ENU.exe" URL="https://download.microsoft.com/download/F/9/4/F942F07D-F26F-4F30-B4E3-EBD54FABA377/NDP462-KB3151800-x86-x64-AllOS-ENU.exe" CheckSum="9A5D647EE710AF2B1AEDE329C40BBE1A" FileSize="0,62008080"></file> </files> <execute file="NDP462-KB3151800-x86-x64-AllOS-ENU.exe" cmdline="/q /norestart" cmdlinesilent="/q /norestart" returncodetoreboot="1641,3010"></execute> <properties Id="{4661371D-BBEA-49B0-AD92-95A563E2353B}" Description="This prerequisite installs the .NET Framework 4.6.2 full standalone package."></properties> <behavior Reboot="2"></behavior> </SetupPrereq>
VC运行库2013文件名:visual c++ 2013 redistributable package (x86).prq
<?xml version="1.0" encoding="utf-8"?> <SetupPrereq> <conditions> <condition Type="32" Comparison="2" Path="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\VC\Servicing\12.0\RuntimeMinimum" FileName="Version" ReturnValue="12.0.21005"></condition> </conditions> <operatingsystemconditions> <operatingsystemcondition MajorVersion="6" MinorVersion="0" PlatformId="2" CSDVersion="" ServicePackMajorMin="2"></operatingsystemcondition> <operatingsystemcondition MajorVersion="6" MinorVersion="1" PlatformId="2" CSDVersion="" ServicePackMajorMin="1"></operatingsystemcondition> <operatingsystemcondition MajorVersion="6" MinorVersion="2" PlatformId="2" CSDVersion=""></operatingsystemcondition> <operatingsystemcondition MajorVersion="6" MinorVersion="3" PlatformId="2" CSDVersion=""></operatingsystemcondition> <operatingsystemcondition MajorVersion="10" MinorVersion="0" PlatformId="2" CSDVersion=""></operatingsystemcondition> </operatingsystemconditions> <files> <file LocalFile="<ISProductFolder>\SetupPrerequisites\VC 2013 Redist\x86\vcredist_x86.exe" URL="http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe" CheckSum="0FC525B6B7B96A87523DAA7A0013C69D" FileSize="0,6503984"></file> </files> <execute file="vcredist_x86.exe" cmdline="/q" cmdlinesilent="/q" returncodetoreboot="1641,3010"></execute> <properties Id="{09F56021-05C8-46A2-BCD8-DBF87ED5C928}" Description="This prerequisite installs the Microsoft Visual C++ 2013 Runtime Libraries (x86)." AltPrqURL="http://saturn.installshield.com/is/prerequisites/Microsoft Visual C++ 2013 Redistributable Package (x86).prq"></properties> <behavior Reboot="2"></behavior> </SetupPrereq>
然后下载,就可以选择了.