Setup Project 安装项目
在新建Setup Project

增加安装内容,通常是直接Oupput一个项目,或者直接添加exe,dll

File System中,可以选择程序安装的目录。


增加User Interface


增加Custom Action

[RunInstaller( true )]
public class InstallHelper : Installer
{
public override void Install(System.Collections.IDictionary stateSaver)
{
base .Install(stateSaver);
try
{
string brandType = string .IsNullOrEmpty(Context.Parameters[ "BrandType" ]) ? "HuaShi" : Context.Parameters[ "BrandType" ];
string assemblypath = Context.Parameters[ "assemblypath" ];
string pathName = Path.Combine(Path.GetDirectoryName(assemblypath), brandType + ".xml" );
if (File.Exists(pathName))
{
File.Delete(pathName);
}
using (Stream st = File.Open(pathName, FileMode.OpenOrCreate))
{
var writer = XmlWriter.Create(st);
writer.WriteStartDocument();
writer.WriteStartElement( "Info" );
writer.WriteElementString( "Seed" , System.Guid.NewGuid().ToString());
writer.WriteElementString( "Brand" , brandType);
writer.WriteEndElement();
writer.Close();
}
}
catch (FormatException e)
{
string s = e.Message;
}
}
}

- http://www.codeproject.com/Articles/12780/A-Setup-and-Deployment-project-that-passes-paramet
- http://stackoverflow.com/questions/7999822/net-setup-project-how-to-pass-multiple-customactiondata-fields
- http://stackoverflow.com/questions/1356160/in-a-visual-studio-setup-project-how-do-i-generate-an-uninstall-script
- http://forums.codeguru.com/showthread.php?301618-Create-an-Uninstall-Shortcut-in-the-StartMenu&p=978211#post978211
Setup Project 安装项目的更多相关文章
- 通过setup.py安装项目dependencies
一.使用方法 安装命令 $ pip install -e <option> setup.py 二.具体介绍 pip intall -e 举例一个setup.py $ pip int ...
- VS2017、VS2019没有Setup安装项目(Visual Studio Installer)_解决方案
前言: VS2010中有一个自带的安装部署项目,叫:Visual Studio Installer ,我们通常称为:setup项目,是一个用于自定义安装部署的项目方案.但是在VS2017,VS2019 ...
- vue入门之vue-cli安装项目
第一步先安装nmp 在node.js的官网下载即可. 第二步 直接安装刚下载好的node.js即可,(这里建议不要修改node.js的安装路径),傻瓜式直接下一步即可 检测是否安装成功: 在cmd的控 ...
- C# winform程序怎么打包成安装项目(VS2010图解)
作为研发人员,在本机上开发的winform.wpf或者控制台程序需要发给其他人测试时候,一般需要对其进行打包生成setup安装文件,根据网上查找的资料并结合自己打包成功,记录如下: 注:本程序是一个利 ...
- 【ctags/cscope/project安装使用】给神编辑器vim添加新的翅膀
本文地址 分享提纲: 1.安装 2.使用cscope 3.使用project 1.安装 1.1)linux(yum下安装) yum -y install cscope 1.2)linux(unbunt ...
- (转)winform安装项目、安装包的制作、部署
本文转载自:http://zhan.renren.com/cxymst?gid=3602888498037535727&from=post&checked=true 1,解决方案—添加 ...
- Visual Studio Installer打包安装项目VS2015
使用VS2015的Visual Studio Installer打包安装项目,虽然整体操作很简单,但还是有几个特殊的点需要记一下,故写下此博客方便以后查阅 第一步,创建安装项目 如下: 里面最左侧的框 ...
- Visual Stdio 2015打包安装项目的方法(使用Visual Studio Installer)
首先在官网下载VS2015的Visual Studio Installer 1.创建安装项目 里面最左侧的框框有三个文件夹 1.“应用程序文件夹”即"Application Folder&q ...
- C#ActiveX安装项目
C#开发的ActiveX控件发布方式有三种: 制作客户端安装包,分发给客户机安装: 制作在线安装包,客户机联机安装: 使用html中object的codebase指向安装包地址. 以下为制作安装包: ...
随机推荐
- hibernateTemplate HibernateDaoSupport不建议在Spring与Hibernate整合中使用
HibernateTemplate类属于spring框架中的类 :org.springframework.orm.hibernate3.HibernateTemplate HibernateTempl ...
- 关于配置php源代码管理环境的几点注意
1.如果你的项目原本就是utf-8的编码,而你设置eclipse的工作空间的默认编码为utf-8后,或者在项目文件夹上右键属性设置了编码类型后依旧没有效果,而是需要在每一个文件上右键属性设置为utf- ...
- 【M8】了解各种不同意义的new和delete
1.首先考虑new operator,new operator 可以认为做了三件事情:a.调用operator new分配一块内存:b.在这块内存上调用构造方法构造对象:返回指针. 2.operato ...
- UVALive 7070 The E-pang Palace 暴力
The E-pang Palace Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/problem ...
- Educational Codeforces Round 1 A. Tricky Sum 暴力
A. Tricky Sum Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/598/problem ...
- Cucumber 入门一
(转自:http://www.cnblogs.com/jarodzz/archive/2012/07/02/2573014.html) 第一次看到Cucumber和BDD(Behavior Drive ...
- CSS3/jQuery自己定义弹出窗体
简单演示一下,精简了演示效果和css样式文件,更利于在项目中的实际应用 引入style.css index.js <!DOCTYPE HTML PUBLIC "-//W3C//DT ...
- Android 使用 Gmail 来发送邮件
Android 使用 Gmail 来发送邮件 1. [代码]SendMail.java package org.apache.android.mail; import android.app.Acti ...
- [AngularJS] Lazy Loading modules with ui-router and ocLazyLoad
We've looked at lazy loading with ocLazyLoad previously, but what if we are using ui-router and want ...
- iOS开发——新特性篇&swift新特性(__nullable和__nonnull)
swift新特性(__nullable和__nonnull) 最近在看老师写代码的时候经常遇到两个陌生的关键字,但是当我在我的电脑上敲得时候就是敲不出,后来才知道这是为了swift与OC混编的时候产生 ...
