vs2010 deploying
http://msdn.microsoft.com/en-us/library/wtzawcsz(v=VS.100).aspx
- 两种部署方式:ClickOnce/WindowsInstaller
- ClickOnce没有安装目录的概念(全部安装到ClickOnce application cache中)。而WI与我们常见的安装方式一致,安装到用户指定的目录中运行。ClickOnce对最终用户来讲,运行就像在原始安装文件位置运行一样,实际安装位置对用户是透明的。
- 两都区别,详细参见这张表
Feature
ClickOnce Windows Installer Automatic update Yes Yes Post-installation rollback1 Yes No Update from Web Yes No Does not affect shared components or other applications Yes No Security permissions granted Grants only permissions necessary for the application (more safe) Grants Full Trust by default (less safe) Security permissions required Internet or Intranet Zone (Full Trust for CD-ROM installation) Administrator Application and deployment manifest signing Yes No Installation-time user interface Single prompt Multipart Wizard Installation of assemblies on demand Yes No Installation of shared files No Yes Installation of drivers No Yes (with custom actions) Installation to Global Assembly Cache No Yes Installation for multiple users No Yes Add application to Start menu Yes Yes Add application to Startup group No Yes Add application to Favorites menu No Yes Register file types Yes Yes Install time registry access Limited Yes Binary file patching No Yes Application installation location ClickOnce application cache Program Files folder - 注意这段话:可以自定制安装和用户界面,让CLICKONCE后台运行。
Custom Installer and User Interface
If you deploy your .exe application by using ClickOnce, you can create a custom graphical user interface to silently install and update the application. The installer can have custom dialog boxes for security and maintenance operations. For more information, see Walkthrough: Creating a Custom Installer for a ClickOnce Application.
- WI可以:
- 定义安装地址
- 增加文件和文件夹
- 关联扩展名
- 修改注册表
- 数字签名
- 全局组件池
- 设置先决条件
- 以管理员身份安装程序
- 提升权限(ELEVATION)
- 管理员提升授权
- 制定动作提升
- ClickOnce为每个安装程序设定一个独立的运行空间,解决了以下问题。但是有一点我没搞懂---如何注册DLL呢。
- 共享组件带来的版本问题
- 在线更新问题
- 安全问题
- ClickOnce有两个XML的描述文件,定义策略:应用描述/部署描述,可以用MAGE来编辑它。安装目录外面的是部署文件(.vsto,.application等开关的),子目录里的是应用文件。
- ClickOnce可以安装第三方包,但必须做成Bootstrapper包的形式
- ClickOnce相关的工具
Tool
Description Security Page, Project Designer Signs the application and deployment manifests. Publish Page, Project Designer Generates and edits the application and deployment manifests for Visual Basic and Visual C# applications. Mage.exe (Manifest Generation and Editing Tool) Generates the application and deployment manifests for Visual Basic, Visual C#, and Visual C++ applications. Signs and re-signs the application and deployment manifests. Can be run from batch scripts and the command prompt. MageUI.exe (Manifest Generation and Editing Tool, Graphical Client) Generates and edits the application and deployment manifests. Signs and re-signs the application and deployment manifests. GenerateApplicationManifest Task Generates the application manifest. Can be run from MSBuild. For more information, see MSBuild Reference. GenerateDeploymentManifest Task Generates the deployment manifest. Can be run from MSBuild. For more information, see MSBuild Reference. SignFile Task Signs the application and deployment manifests. Can be run from MSBuild. For more information, see MSBuild Reference. Microsoft.Build.Tasks.Deployment.ManifestUtilities Develop your own application to generate the application and deployment manifests. - 创建自己的Bootstrapper包步骤
- 先去这里装一个生成器:http://code.msdn.microsoft.com/bmg/Release/ProjectReleases.aspx?ReleaseId=1567
- 把生成的文件拷贝到这里:
\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages
浙公网安备 33010602011771号