还是老外的文章给力

I'm not aware of any way to change the icon BEFORE building the project so that once the ClickOnce is deployed it already has the icon, however you can edit the setup.exe icon AFTER deployment quite easily. If anyone else knows of a way to do it before then they can trump my answer.

In Visual Studio go to File > Open > File and browse to the setup.exe for your ClickOnce deployment. Open this file.

You should see a folder tree. Right click on the Icon node and choose Add Resource.

It should already have the Icon resource type chosen on the left so click Import on the right to add your icon.

Your icon will open up in Visual Studio, just close this tab. You should be back to your folder tree. Look under the Icon node and make sure your icon has the lowest ID number.

Save the file.

Your setup.exe will now have the new icon.

Disclaimer: For me Windows was weird and didn't refresh the icon right away. If I went to its properties or copied the file elsewhere I could see the icon immediately. I imagine it's a caching thing.

Edit: Screenshot:

from:http://stackoverflow.com/questions/35019832/how-to-change-setup-exe-icon-when-publishing-through-clickonce

【转】vs2012 打包安装更改 setup.exe的图标的更多相关文章

  1. vs2010 setup 打包 安装 BAT批处理实现自动安装软件功能

    CLS@echo offECHO.ECHO 安装 Diskeeper 7.0.428ECHO 请稍等...start /wait %systemdrive%\install\Applications\ ...

  2. 安装VS时,双击setup.exe后界面一闪而过的问题

    问题:安装VS时,双击setup.exe界面一闪而过的问题 解决: 百度后说需要到"控制面板/添加和管理程序"关闭系统自带的netframework3.x及以上版本. 1.查看所有 ...

  3. windows2008R2下安装sqlserver2008R2时,点setup.exe应用程序无法打开错误代码0xc0150004

    windows2008R2下安装sqlserver2008R2时,点setup.exe应用程序无法打开错误代码0xc0150004 问题截图: 网上查的答案都是需要安装.net framework 3 ...

  4. VS2012打包Winform教程 [转]

    VS2012打包部署Winform程序 打包前的准备工作: 里边会提到第一次使用的时候打开网页填数据什么的..最终要下载一个EXE文件..其实大可不必.. 直接百度InstallShield2012S ...

  5. VS2012打包部署教程

    前言 通常我们只是写一些系统,然后想要运行功能的时候就打开代码点击启动,这样只适用于开发人员或者局部开发人员这样做,软件开发的大多数意义上就是拿出开发的软件让用户放心的去点.用户无需知道代码,无需知道 ...

  6. VS2012 打包部署程序

      一. 下载 InstallShield 2015(支持VS2012) VS2012没有自带打包工具,所以要先下载并安装一个打包工具.我采用微软提供的打包工具:  InstallShield2015 ...

  7. 打包python脚本为exe可执行文件-pyinstaller和cx_freeze示例

    本文介绍使用cx_freeze和pyinstaller打包python脚本为exe文件 cx_freeze的使用实例 需要使用到的文件wxapp.py, read_file.py, setup.py ...

  8. 在InstallShield中发布单一的Setup.exe文件

    原文:在InstallShield中发布单一的Setup.exe文件 InstallShield默认的Release模式下,生成了一个setup.exe文件,一个msi文件,以及一些其它的杂项文件. ...

  9. WEB项目(B/S系统)打包安装(总结篇)

    原文:WEB项目(B/S系统)打包安装(总结篇) 打包安装程序的制作选择性还很多的,有installshield,wise installer,inno setup这几个做打包安装项目都是很强大的,要 ...

随机推荐

  1. Android ListView ListActivity PreferenceActivity背景变黑的问题ZT

    Android ListView ListActivity PreferenceActivity背景变黑的问题 ListView在滚动时背景会变暗甚至变黑,这个要从Listview的效果说起,默认的L ...

  2. 四、CCSprite

    在介绍CCSprite之前,先要理解游戏开发中的一个核心概念:精灵.精灵也称为游戏对象,它可以用来表示游戏中的任何物体,比如敌人.子弹.甚至是一个背景图片.一段文字.CCSprite可以说是在coco ...

  3. Python 获取 网卡 MAC 地址

    /*********************************************************************** * Python 获取 网卡 MAC 地址 * 说明: ...

  4. 3des加解密算法

    编号:1003时间:2016年4月1日09:51:11功能:openssl_3des加解密算法http://blog.csdn.net/alonesword/article/details/17385 ...

  5. js校验表单后提交表单的三种方法总结(转)

    第一种: 代码如下: <script type="text/javascript"> function check(form) { if(form.userId.val ...

  6. mySQL CRUD操作(数据库的增删改查)

    一.数据库操作 1.创建数据库 create database 数据库名称 2.删除数据库 drop database 数据库名称   二.表操作 1.创建表 create table 表名 (    ...

  7. Xen虚拟机磁盘镜像模板制作(二)—Windows Server 2008(2012)

    在<Xen虚拟机磁盘镜像模板制作(一)—Windows Server 2008(2012)>一文中,我们已经成功制作出了Windows Server磁盘镜像.下面我们说明下如何通过它来生成 ...

  8. USB Packet Types

    USB has four different packet types. Token packets indicate the type of transaction to follow, data ...

  9. 如何用 freebayes call SNP

    1,软件介绍 FreeBayes is a Bayesian genetic variant detector designed to find small polymorphisms, specif ...

  10. iOS学习笔记---c语言第二天

    一.bool布尔类型    c语言没有bool类型,oc里有bool类型 是一种非真即假的数据类型,布尔类型的变量只有yes和no两个值.yes表示表达式是真,no表示表达式是假. 在c语言中认为非0 ...