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指向安装包地址. 以下为制作安装包: ...
随机推荐
- Python requests模块
import requests 下面就可以使用神奇的requests模块了! 1.向网页发送数据 >>> payload = {'key1': 'value1', 'key2': [ ...
- 权限检查联系人ProfileProvider
每日一贴,今天的内容关键字为权限检查 ProfileProvider继承自AbstractContyactsProvider. 源代码请自行下载 每日一道理 书籍好比一架梯子,它能引领人们登上 ...
- Spring+Ibatis集成开发实例
首先简历数据库demo(本文选mysql) 数据库脚本: CREATE TABLE `ibatis` ( `id` varchar(20) NOT NULL, `name` varchar(20) ...
- Codeforces Gym 100513D D. Data Center 前缀和 排序
D. Data Center Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/560/proble ...
- 401 Palindromes(回文词)
Palindromes A regular palindrome is a string of numbers or letters that is the same forward as ba ...
- 通过ulimit改善linux系统性能(摘自IBM)
本文介绍了 ulimit 内键指令的主要功能以及用于改善系统性能的 ulimit 用法.通过这篇文章,读者不仅能够了解 ulimit 所起的作用.而且能够学会怎样更好地通过 ulimit 限制资源的使 ...
- [Javascript] Other functor
EventStream: You can use RxJS, BaconJS or any reactive programming lib you want: var id_s = map(func ...
- Xcode8中Swift3.0适配问题
写在前面 收到一些小伙伴的来信,觉得可能下边没有表达清楚,先把大家关心的要点在此进行总结,有兴趣的可以看看下边的研究过程,没兴趣的直接看这段即可. Xcode8支持Swift2.3和Swift3.0两 ...
- ResolveClientUrl("~/Styles/Site.cs")%>
区别: <%=ResolveClientUrl("~/Styles/Site.cs")%> 和 <%=ResolveUrl("~/Styles/Site ...
- 在一个文件中有10G个整数,乱序排列,要求找出中位数
题目:在一个文件中有 10G 个整数,乱序排列,要求找出中位数.内存限制为 2G.只写出思路即可(内存限制为 2G的意思就是,可以使用2G的空间来运行程序,而不考虑这台机器上的其他软件的占用内存). ...
