原文:InstallShield Limited Edition for Visual Studio 2013 图文教程(教你如何打包.NET程序)InstallShield Limited Edition for Visual Studio 2013 图文教程(教你如何打包.NET Framework进去)
从Visual Studio 2012开始,微软就把自家原来的安装与部署工具彻底废掉了,转而让大家去安装使用第三方的打包工具“InstallShield Limited Edition for Visual Studio”,注意这个版本是免费的,只需要邮件注册下,就会有要注册码。虽然不知道微软这是何用意,但是既然他叫我们用,那就去用吧。(其实,早在VS2010中,微软就把InstallShield Limited Edition for Visual Studio放在里面了,只是那个时候自家产品还在)。
由于InstallShield Limited Edition for Visual Studio的教程、资料太少,所以我今天才决定写这个文章,专门针对C#项目打包,包括打包集成Microsoft .NET Framework等。大家从官方下载的最新版InstallShield Limited Edition for Visual Studio,是支持VS2010、VS2012、VS2013的(小牛在WIN7、WIN8中安装正常,但是WIN8.1死活都安装不进去……)
如何下载注册:
http://go.microsoft.com/fwlink/?LinkID=239620&lang=1033&ver=ult
用你的邮箱注册,会免费发注册码的,不需要破解
具体步骤:

1、新建了一个基本的三层项目,用来测试打包

2、根据实际情况,填写程序基本信息

3、这一步非常重要,看上图 :
1)设置为简体中文,否则安装路径有中文的话就会出问题
2)设置默认安装路径
3)修改默认字体
4)每次升级,重新打包,只需要点击这一行右侧的“...”按钮,就会重新生成Code,安装时就会自动覆盖老版本

4、选择我要的.NET Framework 4.0

5、这里什么也不做

6、添加要打包的文件、程序

7、右键——属性(Properties)

8、非常重要:
1)如果你的是.NET项目程序DLL、EXE,那就按照默认的设置,不要去改,否则出错
2)如果你的是OCX或者ActiveX等需要注册的DLL,那么选择“Self-registration”

9、设置快捷方式

10、注册表配置:
1)打开这个
2)现在这个测试项目,不需要写注册表信息,所以我什么都不改。如果你的项目要写注册表,那就自己填。

11、安装访谈(安装界面对话框配置):
1)打开这个
2)我就不修改了,大家根据自己的需求调整。
3)如果要修改,点击这个

12、修改安装步骤、对话框、背景等

13、到这这一步,就剩下最重要的问题:如何把.NET Framework一起打包进程序去:
1)解决方案,点击“Specify Application Data”--双击“Redistributables”--勾选“Microsoft .NET Framework 4.0 Full”--勾选之后,它会自动联网下载,下载速度是比较慢的,下完之后,右侧就会变成“Installed Locally”
A).NET 4.0:如果大家嫌慢,那就去网上下载:dotNetFx40_Full_x86_x64.exe,然后放到这个路径:
C:\Program Files (x86)\InstallShield\2013LE\SetupPrerequisites\Microsoft .net\4.0\Full
这样的话就能节省很多时间了,不过除了这个,它还需要下载其他东西的,只是你可以节省这部分时间
B).NET 3.5 SP1:下载dotnetfx35.exe,然后放到这个路径:
C:\Program Files (x86)\InstallShield\2013LE\SetupPrerequisites\Microsoft .net\3.5 SP1\Full

14、最后的设置:
1)解决方案,点击“Prepare for Release”--双击“Releases”--点击选中“SingleImage”--选项卡点击“Setup.exe”--找到“InstallShield Prerequisites Location”,把它设置为“Extract From Setup.exe”

15、打包完成了,运行效果如上图:
1)打包后的程序放在这个地方:XXX\Express\SingleImage\DiskImages\DISK1\setup.exe (70.9MB,比较大)
All by flydoos 2013-11-19
InstallShield Limited Edition for Visual Studio 2013 图文教程(教你如何打包.NET程序)
原文:http://www.cnblogs.com/lonelyxmas/p/4066197.html