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指向安装包地址. 以下为制作安装包: ...
随机推荐
- CKEditor与CKFinder整合并实现文件上传功能
事先说明:此整合的是java版本的, 用到的有:jsp + ckeditor + ckfinder (没有servlet 及其它框架技术) 一.需要的资源: 用到的网站,文件自己下载: a) cked ...
- hibernate 实体关系映射笔记
@经常使用属性说明: @Entity:实体类 @Table:指定相应数据表 @Id:主键,使用能够为null值的类型,假设实体类没有保存到数据库是一个暂时状态 @Col ...
- 高级I/O之记录锁
若两个人同时编辑一个文件,其后果将如何呢?在很多UNIX系统中,该文件的最后状态取决于写该文件的最后一个进程.但是对于有些应用程序(例如数据库),进程有时需要确保它正在单独写一个文件.为了向进程提供这 ...
- python中文处理之encode/decode函数
python中文处理相信迷惑过不少同学.下面说说python2/3的encode和decode函数. python2中,使用decode()和encode()来进行解码和编码,以unicode类型作为 ...
- org.apache.hadoop.filecache-*
我不知道为什么这个包为什么是空的,从名字上看应该是一些管理文件缓存的类吗? 网上也没查到什么,各种群里也没大牛回答. 期望某位大牛能告诉我答案,谢谢
- iOS之duplicate symbols for architecture x86_64错误
在我们写代码过程中可能会经常遇到这样一个错误: <span style="font-size:32px;color:#ff0000;">ld: 4 duplicate ...
- AT-PagerAdapter
关于PagerAdapter的粗略翻译 英文版api地址:PagerAdapter(自备梯子) PagerAdapter 已知直接子类:FragmentPagerAdapter.Fra ...
- CSS skills: 3) show sub-navigate items when mouse hove on nav-item
<header> <div class="am-g am-g-fixed"> <ul class="am-avg-lg-2 topbar f ...
- [转]永久告别Android的背景选择器Selector!无需切很多图了!
package com.zoke.custom.autobg; import android.content.Context; import android.content.res.TypedArra ...
- Linux vsftpd 无法登录 cannot change directory:xxx priv_sock_get_cmd 问题
配置vsftpd时本地用户无法切换不能登录问题.问题如下: C:\Users\kai>ftp ftp> open 172.24.144.10 连接到 172.24.144.10. (vsF ...
