还是老外的文章给力

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. Asp登陆

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QYLogin.aspx.c ...

  2. Unity3D ShaderLab 透明裁剪着色器

    Unity3D ShaderLab 透明裁剪着色器 上一篇,我们介绍了使用Alpha实现透明的手法,其实Unity为我们的#pragma提供了另一种参数,是我们能做出更高效 简单的透明效果,也就是裁剪 ...

  3. 关于VS中更改栈和堆空间的大小

    编号:1008时间:2016年4月12日17:01:38功能:关于VS中更改栈和堆空间的大小 URL:http://blog.csdn.net/icerock2000/article/details/ ...

  4. USB相关的网络资料

    相关资源连接: USB官网:http://www.usb.org/home <USB in a NutShell>: http://www.beyondlogic.org/usbnutsh ...

  5. jquery 平滑滚动页面到某个锚点

    $(document).ready(function() {         $("a.topLink").click(function() {                 $ ...

  6. Matlab 2012a 下载和安装教程

    迅雷下载地址    http://bbs.pinggu.org/thread-1426998-1-1.html(下载速度比较快) 1 Setup.exe 2. 不使用 internet 安装 then ...

  7. jquery商城购物车右侧悬浮加入购物车动画效果

    <script type="text/javascript" src="js/jquery-1.7.min.js"></script> ...

  8. CSS基础知识点(二)——选择器

    在这一篇中,主要总结一下CSS中的选择器. 参考:http://www.cnblogs.com/webblog/archive/2009/07/07/1518274.html CSS中的选择器主要包括 ...

  9. JS初学之-效果没出来怎么办?-alert函数测试

    一般出了问题之后,有经验的高手一眼就可以看出来,但是对于我们初学者来说,利用alert函数不失为一个好方法. 这时我们要利用逐行测试的方法,在任意一句代码下加alert,如果可以弹出来就说明上面的没有 ...

  10. 传统解析xml的方式

    1. 介绍 1)DOM(JAXP Crimson解析器)          DOM是用与平台和语言无关的方式表示XML文档的官方W3C标准.DOM是以层次结构组织的节点或信息片断的集合.这个层次结构允 ...