﻿<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>学习日记 &#187; 安装部署</title>
	<atom:link href="https://www.softwareace.cn/?cat=104&#038;feed=rss2" rel="self" type="application/rss+xml" />
	<link>https://www.softwareace.cn</link>
	<description>时刻想着为自己的产品多做一些对他好的事情</description>
	<lastBuildDate>Fri, 20 Mar 2026 06:58:28 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>NSetup一键自动升级安装包制作</title>
		<link>https://www.softwareace.cn/?p=1799</link>
		<comments>https://www.softwareace.cn/?p=1799#comments</comments>
		<pubDate>Fri, 19 Nov 2021 05:22:42 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[nsis]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=1799</guid>
		<description><![CDATA[您是否在为新产品没有安装包或者自动升级而发愁？ 是否因为目前已有安装不稳定，不支持美化或者频繁被杀毒误报等而苦 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p style="color: #222222;">您是否在为新产品没有安装包或者自动升级而发愁？<br />
是否因为目前已有安装不稳定，不支持美化或者频繁被杀毒误报等而苦恼？<br />
一切交给NSetup解决方案来处理，您专心做产品，专业的人做专业的事，</p>
<p style="color: #222222;">安装升级这种后勤工作交给NSetup，辅助您一路前行！</p>
<p style="color: #222222;">
<p style="color: #222222;"><span style="color: #d35400;"><span style="font-weight: bolder;">NSetup一键自动升级安装包制作</span></span><br />
官方网站<a style="color: #2378ff;" href="https://support.qq.com/products/341558/faqs/106125" target="_blank">https://www.nsetup.cn</a></p>
<p style="color: #222222;"><span style="font-weight: bolder;">专业提供美化安装，增量升级，数据统计等服务</span></p>
<p style="color: #222222;"><img src="https://img.alicdn.com/imgextra/i3/822827686/O1CN01fwGofC26eEsOHGtKG_!!822827686.png" alt="O1CN01fwGofC26eEsOHGtKG_!!822827686.png" /></p>
<p style="color: #222222;"><span style="font-weight: bolder;">产品卖点</span></p>
<p style="color: #222222;"><span style="font-weight: bolder;">1.产品成熟</span></p>
<p style="color: #222222;">NSetup从2016年一直发布至今，不断收集客户需求和问题，逐步完善产品，使得NSetup成为Windows部署方面，安全稳定高效的解决方案。</p>
<p style="color: #222222;"><span style="font-weight: bolder;">2. 全部脚本源代码</span></p>
<p style="color: #222222;">方案包含全部产品脚本源码，代码高度整理，可自行二次开发和维护，兼容标准NSIS，方便查找资料</p>
<p style="color: #222222;"><img src="https://img.alicdn.com/imgextra/i4/822827686/O1CN01rJ6hpN26eEs8uOj3q_!!822827686.png" alt="O1CN01rJ6hpN26eEs8uOj3q_!!822827686.png" /></p>
<p style="color: #222222;"><span style="font-weight: bolder;">3. 永久授权</span></p>
<p style="color: #222222;">产品永久授权，终身免费升级，订单内问题终身免费售后</p>
<p style="color: #222222;"><span style="font-weight: bolder;">4.交易无风险</span></p>
<p style="color: #222222;">客户可提供自己真实项目，进行打包测试，测试满意后再进行付款，零风险</p>
<p style="color: #222222;"><span style="font-weight: bolder;">5.简单易用，功能强大</span></p>
<p style="color: #222222;">提供一键部署工具，首次配置完，以后一键完成所有操作，简化操作，避免人为错误<br />
复杂设置界化，对于一些常规需求，可以通过NSetup项目设置进项修改，无需了解技术细节<br />
<img src="https://img.alicdn.com/imgextra/i1/822827686/O1CN0137EwYH26eEsOHR1l9_!!822827686.png" alt="O1CN0137EwYH26eEsOHR1l9_!!822827686.png" /></p>
<p style="color: #222222;">
<p style="color: #222222;"><span style="font-weight: bolder;">6. 可自定义二次开发</span></p>
<p style="color: #222222;">界面基于DirectUI技术，支持动画，窗体特效等，可支持各种酷炫界面自定义开发</p>
<p style="color: #222222;"><span style="font-weight: bolder;">7.成员技术背景</span></p>
<p style="color: #222222;">成员大都来自国内头部软件公司，如金山软件等，拥有10年以上开发经验</p>
<p style="color: #222222;">
<p style="color: #222222;"><span style="font-weight: bolder;">部分服务客户展示</span></p>
<p style="color: #222222;"><img src="https://img.alicdn.com/imgextra/i1/822827686/O1CN011vK2KY26eEsHumWdE_!!822827686.png" alt="O1CN011vK2KY26eEsHumWdE_!!822827686.png" /></p>
<p style="color: #222222;">
<h3 style="font-weight: normal; color: #2c2c2c;"><span style="font-weight: bolder;">部分例子展示</span></h3>
<h3 style="font-weight: normal; color: #2c2c2c;">更多可查看官网 <a style="color: #2378ff;" href="https://support.qq.com/products/341558/faqs/106125" target="_blank">https://nsetup.cn/html/products/</a></h3>
<p style="color: #222222;"> <img src="https://img.alicdn.com/imgextra/i1/822827686/TB2A35RdbRkpuFjSspmXXc.9XXa_!!822827686.gif" alt="TB2A35RdbRkpuFjSspmXXc.9XXa_!!822827686.gif" width="582" height="499" /></p>
<p style="color: #222222;"><img src="https://img.alicdn.com/imgextra/i1/822827686/TB2z5ZLc4XkpuFjy0FiXXbUfFXa_!!822827686.gif" alt="TB2z5ZLc4XkpuFjy0FiXXbUfFXa_!!822827686.gif" width="583" height="432" /></p>
<p style="color: #222222;"><img src="https://img.alicdn.com/imgextra/i2/822827686/TB2c17YcYVkpuFjSspcXXbSMVXa_!!822827686.gif" alt="TB2c17YcYVkpuFjSspcXXbSMVXa_!!822827686.gif" width="621" height="418" /></p>
<p style="color: #222222;">
<p style="color: #222222;"> <img src="https://img.alicdn.com/imgextra/i2/822827686/TB2WPMUcYXlpuFjy1zbXXb_qpXa_!!822827686.gif" alt="TB2WPMUcYXlpuFjy1zbXXb_qpXa_!!822827686.gif" width="618" height="416" /></p>
<p style="color: #222222;"><img src="https://img.alicdn.com/imgextra/i2/822827686/TB2OeMRc3xlpuFjSszbXXcSVpXa_!!822827686.gif" alt="TB2OeMRc3xlpuFjSszbXXcSVpXa_!!822827686.gif" width="521" height="329" /></p>
<p style="color: #222222;"><img src="https://img.alicdn.com/imgextra/i2/822827686/TB2th9Mdm0jpuFjy0FlXXc0bpXa_!!822827686.gif" alt="TB2th9Mdm0jpuFjy0FlXXc0bpXa_!!822827686.gif" width="563" height="707" /></p>
<p style="color: #222222;"> <img src="https://img.alicdn.com/imgextra/i3/822827686/TB2Idz9XX95V1Bjy0FbXXawipXa_!!822827686.gif" alt="TB2Idz9XX95V1Bjy0FbXXawipXa_!!822827686.gif" width="508" height="674" /></p>
<p style="color: #222222;">
<p style="color: #222222;"><img src="https://img.alicdn.com/imgextra/i1/822827686/TB2cO1Sdl8lpuFjy0FnXXcZyXXa_!!822827686.gif" alt="TB2cO1Sdl8lpuFjy0FnXXcZyXXa_!!822827686.gif" width="764" height="414" /></p>
<p style="color: #222222;"><img src="https://img.alicdn.com/imgextra/i4/822827686/TB2G5Y8Xae5V1BjSspkXXcoqpXa_!!822827686.gif" alt="TB2G5Y8Xae5V1BjSspkXXcoqpXa_!!822827686.gif" width="690" height="705" /></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=1799</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>安装net.framework4产生阻滞的问题: 前一次安装要求重新启动计算机</title>
		<link>https://www.softwareace.cn/?p=1605</link>
		<comments>https://www.softwareace.cn/?p=1605#comments</comments>
		<pubDate>Fri, 10 Mar 2017 08:56:51 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[nsis]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=1605</guid>
		<description><![CDATA[安装net.framework4时出现对话框： “产生阻滞的问题: 前一次安装要求重新启动计算机，所以安装程序 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p style="color: #666666;">安装net.framework4时出现对话框：</p>
<p style="color: #666666;">“产生阻滞的问题: 前一次安装要求重新启动计算机，所以安装程序无法继续。请重新启动计算机，然后重新运行。”</p>
<p style="color: #666666;">按照要求重启电脑后还是出现以上提示，具体如何解决呢？方法如下。</p>
<p style="color: #666666;">打开控制面板——将右上角的查看方式改为“大图标”——打开windows update——打开更新设置——改成更新是提醒自己选择更新——在更新中点击立即重启电脑。</p>
<p style="color: #666666;">重启电脑后再安装net4就没问题了。</p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=1605</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>群晖 DSM shr 无数据保护</title>
		<link>https://www.softwareace.cn/?p=1570</link>
		<comments>https://www.softwareace.cn/?p=1570#comments</comments>
		<pubDate>Wed, 21 Dec 2016 02:02:20 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[nas]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=1570</guid>
		<description><![CDATA[如果是先安装1个盘，后来又加了一块，（不是同时安装的），想做SHR， 1.第一块已安装的是按默认配置（SHR） [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>如果是先安装1个盘，后来又加了一块，（不是同时安装的），想做SHR，</p>
<p>1.第一块已安装的是按默认配置（SHR）</p>
<p>2.安装第二块，</p>
<p>3.打开存储空间管理员，存储空间，管理，扩容即可</p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=1570</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>什么是 Synology Hybrid RAID (SHR)</title>
		<link>https://www.softwareace.cn/?p=1568</link>
		<comments>https://www.softwareace.cn/?p=1568#comments</comments>
		<pubDate>Tue, 20 Dec 2016 09:22:29 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[nas]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=1568</guid>
		<description><![CDATA[https://www.synology.com/zh-cn/knowledgebase/DSM/tutori [&#8230;]]]></description>
				<content:encoded><![CDATA[<address style="font-weight: 400; color: #3c4650;">https://www.synology.com/zh-cn/knowledgebase/DSM/tutorial/Storage/What_is_Synology_Hybrid_RAID_SHR</address>
<h1 style="font-weight: 400; color: #3c4650;">什么是 Synology Hybrid RAID (SHR)</h1>
<p><img style="color: #444444;" src="https://www.synology.com/_images/tutorials/tutorials/how_to_whats_Synology_Hybrid_RAID.jpg" alt="" /></p>
<h2 style="color: #3c4650;">总览</h2>
<p style="color: #505a64;">Synology Hybrid RAID（SHR）是 Synology 的自动 RAID 管理系统，经专门设计可使部署存储卷变得快速和方便。如果您不太了解 RAID，建议使用 SHR 在 Synology NAS 是设置存储卷。</p>
<p style="color: #505a64;">您将了解不同类型的 SHR 及其与传统的单一硬盘/RAID 设置相比的有利/不利方面。最后，我们将可选择一类 RAID 或 SHR 以使您的存储卷获得最大的利益。本文章已假设您是 Synology NAS 的 admin，并认为您是有经验的网管人员，对于 RAID 管理已有透彻的了解。</p>
<p><a id="top" style="font-weight: bold; color: #0086e5;" name="top"></a></p>
<h2 style="color: #3c4650;">目录</h2>
<ol class="last" style="color: #505a64;">
<li><a style="font-weight: bold; color: #0086e5;" href="https://www.synology.com/zh-cn/knowledgebase/DSM/tutorial/Storage/What_is_Synology_Hybrid_RAID_SHR#t1">什么是 Synology Hybrid RAID（SHR）？</a></li>
<li><a style="font-weight: bold; color: #0086e5;" href="https://www.synology.com/zh-cn/knowledgebase/DSM/tutorial/Storage/What_is_Synology_Hybrid_RAID_SHR#t2">常见问题</a></li>
</ol>
<hr style="color: #444444;" size="1" />
<h3 class="list_head" style="color: #3c4650;"><a id="t1" style="color: #0086e5;" name="t1"></a>1.什么是 Synology Hybrid RAID（SHR）？</h3>
<p style="color: #505a64;">SHR 是一个自动的 RAID 管理系统，它可使存储卷部署比传统的 RAID 系统更加轻松。SHR 可让用户进行 RAID 管理、扩充存储器、使存储容量最大化，即便它们没有很好掌握各种 RAID 级别。SHR 允许 1 颗 或 2 颗硬盘冗余 &#8211; 这意味着 SHR 卷能够经受住最多 2 颗硬盘发生故障而数据卷仍可使用。请注意，一个 RAID 卷（传统 RAID 或 SHR）不是备份系统。</p>
<div class="code_div" style="color: #444444;"><strong style="color: #3c4650;">注：</strong></p>
<p style="color: #505a64;">RAID（Redundant Array of Independent Disks）就是将多颗硬盘整合成一个逻辑单元的存储技术。</p>
</div>
<p style="color: #505a64;"><strong style="color: #3c4650;">SHR 是必要的吗？</strong></p>
<p style="color: #505a64;">不，无需使用 SHR。SHR 基于 Linux RAID 管理系统，且使用时完全可选。在寻求存储数据保护方面，SHR 不仅使传统 RAID 系统的专家用户受益，也能使没有太多技术背景的新手用户受益。但 SHR 并非在所有的 Synology NAS 型号中都适用。若要了解不支持 SHR 的型号，请参见<a style="font-weight: bold; color: #0086e5;" href="https://www.synology.com/zh-cn/knowledgebase/DSM/tutorial/Storage/Which_models_have_limited_support_to_Synology_Hybrid_RAID_SHR">此文</a>。</p>
<p style="color: #505a64;">对于专家用户，如果他们要手动管理 RAID 系统，建议使用传统 RAID 层级。以下手动 RAID 层级可在 Synology NAS 上可用：</p>
<ol style="color: #505a64;">
<li>Basic</li>
<li>JBOD</li>
<li>RAID 0</li>
<li>RAID 1</li>
<li>RAID 5</li>
<li>RAID 6</li>
<li>RAID 10</li>
</ol>
<p style="color: #505a64;"><strong style="color: #3c4650;">SHR 如何最大化存储空间？</strong></p>
<p><img style="color: #444444;" src="https://www.synology.com/_images/tutorials/whats_Synology_Hybrid_RAID/image_1.jpg" alt="" /></p>
<p style="color: #505a64;">上图显示了传统 RAID 基于阵列内最小的硬盘创建存储卷。如果传统 RAID 阵列以 500 GB 硬盘创建，则该阵列内的所有其它硬盘只能各提供 500 GB 的存储空间，因此将创建一个 5 x 500 GB RAID 的存储卷并浪费其它未使用的 4.5 TB 空间。</p>
<p><img style="color: #444444;" src="https://www.synology.com/_images/tutorials/whats_Synology_Hybrid_RAID/image_2.jpg" alt="" /></p>
<p style="color: #505a64;">与传统 RAID 不同，SHR 将每个硬盘卷分为较小的块并创建附加冗余存储。通过使用 SHR，您可将无法使用的 4.5 TB 卷用途较小的可用块，从而使各硬盘的存储空间最大化。</p>
<p style="color: #505a64;"><strong style="color: #3c4650;">通过 SHR 用较大的硬盘扩充</strong></p>
<p style="color: #505a64;">SHR 还可在用户扩展存储空间时超出传统 RAID。</p>
<p><img style="color: #444444;" src="https://www.synology.com/_images/tutorials/whats_Synology_Hybrid_RAID/image_3.jpg" alt="" /></p>
<p style="color: #505a64;">正如上图所示，传统 RAID 在所有硬盘都升级之前无法升级存储空间。</p>
<p><img style="color: #444444;" src="https://www.synology.com/_images/tutorials/whats_Synology_Hybrid_RAID/image_4.jpg" alt="" /></p>
<p style="color: #505a64;">如传统 RAID 不同，SHR 可使新升级的存储空间可用。如果替换为较大的硬盘，升级的存储空间可在其中两个硬盘升级后立即使用以形成冗余存储阵列。</p>
<p style="color: #505a64;">SHR 的这一快速使用功能可满足经常升级大硬盘（如 10 颗硬盘的卷）而同时按需要可访问数据的需求。此外，作为一个经济可行的方法，SHR 有助于用户获得最大的存储容量而无需购买整套硬盘。</p>
<p style="color: #505a64;"><strong style="color: #3c4650;">Synology Hybrid RAID（2 颗硬盘冗余）</strong></p>
<p><img style="color: #444444;" src="https://www.synology.com/_images/tutorials/whats_Synology_Hybrid_RAID/image_5.jpg" alt="" /></p>
<p style="color: #505a64;">2 颗硬盘冗余版的 SHR 自 DSM 3.1 可用。若要使用 2 颗硬盘冗余 SHR，需要至少 4 颗硬盘以创建卷。如果您要扩充 2 颗硬盘冗余 SHR 卷，新的存储空间将在添加四颗硬盘至 SHR 卷或将已有硬盘中的四颗扩充到其中后立即可用。</p>
<div class="code_div" style="color: #444444;"><strong style="color: #3c4650;">注：</strong></p>
<p style="color: #505a64;">无法将 1 颗硬盘冗余 SHR 转换为 2 颗硬盘冗余 SHR。</p>
</div>
<h3 class="list_head" style="color: #3c4650;"><a id="t2" style="color: #0086e5;" name="t2"></a>2.常见问题</h3>
<p style="color: #505a64;"><strong style="color: #3c4650;">我能以较大的硬盘扩充一个 SHR 卷（如 1TB 至 3TB）吗？</strong></p>
<p style="color: #505a64;">是的，您可以通过一次更改一个硬盘来扩充一个 SHR 卷，并允许 DiskStation Manager 来修复卷。一旦有足够的冗余存储空间可用，SHR 卷将扩充可用的存储容量。</p>
<p style="color: #505a64;"><strong style="color: #3c4650;">我能以增加额外的硬盘扩充一个 SHR 卷（如 5 x 1TB 至 15 x 1TB）吗？</strong></p>
<p class="last" style="color: #505a64;">是的，您可以通过添加额外的硬盘至已有的阵列来扩充 SHR 卷，尤其是对那些因预算或存储需求来扩充存储空间的用户而言。</p>
<p style="color: #505a64;">请注意，如果用更多的硬盘来扩充 SHR 卷，您的 Synology NAS 可能需要许多时间来使所有的已安装硬盘可用。我们提出一个快速方式来进行扩充：在使用 Synology NAS 时，计划扩充的时间，并扩充硬盘。毕竟扩充硬盘比添加硬盘更具时间效率。</p>
<p style="color: #505a64;"><strong style="color: #3c4650;">已创建的 SHR 卷接受较小容量的硬盘吗？</strong></p>
<p style="color: #505a64;">假设您的 SHR 卷建在 1TB 硬盘上。若要替换旧硬盘或添加新硬盘，必须使用等于或大于 1TB 的硬盘。较少的硬盘（如 500GB）无法添加到已有的 SHR（或传统 RAID）卷上。即便添加了这一较小的硬盘，该较小硬盘的存储空间仍无法在此卷中使用。</p>
<p style="color: #505a64;"><strong style="color: #3c4650;">我能将 SHR 卷的硬盘容错更改为具有 1 颗硬盘的容错机制吗？</strong></p>
<p style="color: #505a64;">是。如果单硬盘 SHR 卷运行时没有硬盘容错，您可再添加一颗硬盘以建立 1 颗硬盘容错，等于 RAID 1 的数据冗余：</p>
<ol style="color: #505a64;">
<li>在 Synology NAS 中安装一个额外的硬盘。</li>
<li>请进入<strong style="color: #3c4650;">存储管理器</strong> &gt; <strong style="color: #3c4650;">卷</strong> &gt; <strong style="color: #3c4650;">管理</strong> &gt; <strong style="color: #3c4650;">添加硬盘来扩充卷</strong>。</li>
<li>添加新硬盘至 SHR 卷后，该卷将具有 1 颗硬盘容错的能力。</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=1568</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NSetup  一键自动升级安装包制作</title>
		<link>https://www.softwareace.cn/?p=1533</link>
		<comments>https://www.softwareace.cn/?p=1533#comments</comments>
		<pubDate>Wed, 02 Nov 2016 06:48:02 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[nsis]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=1533</guid>
		<description><![CDATA[官方网站：https://nsetup.cn/index.html NSetup(一键自动升级安装包制作)是一 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><strong>官方网站</strong>：<a href="https://nsetup.cn/index.html" target="_blank">https://nsetup.cn/index.html</a></p>
<p><span style="color: #1a1aa6;">NSetup(一键自动升级安装包制作)是一款专业的安装程序制作软件, 目前有很多大型软件在基于NSetup进行部署，包括大型网络软件，银行项目，部队系统等，主要特点:一键部署安装和升级，逻辑基于NSIS，脚本源码级别方便客户自己二次开发维护, 界面支持各种酷炫动效。</span></p>
<p>&nbsp;</p>
<p><img src="https://nsetup.cn/uploads/210407/1-21040G1441N61.png" alt="" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=1533</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>115浏览器 NSIS源代码 A版</title>
		<link>https://www.softwareace.cn/?p=1426</link>
		<comments>https://www.softwareace.cn/?p=1426#comments</comments>
		<pubDate>Wed, 13 Jan 2016 05:32:51 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[nsis]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=1426</guid>
		<description><![CDATA[[crayon-69fb5c7083475061833048/] &#160;]]></description>
				<content:encoded><![CDATA[<p></p><pre class="crayon-plain-tag">/*
    Compile the script to use the Unicode version of NSIS
    The producers：surou
*/
;ExecShell taskbarunpin "$DESKTOP\${PRODUCT_NAME}.lnk"是删除任务栏图标

;安装包 解压空白
!system '&gt;blank set/p=MSCF&lt;nul'
!packhdr temp.dat 'cmd /c Copy /b temp.dat /b +blank&amp;&amp;del blank'

;定义变量
Var Dialog
Var MessageBoxHandle
Var installPath
Var FreeSpaceSize

; 安装程序初始定义常量
!define PRODUCT_VERSION "2016.01.11.000"
!define MAIN_APP_NAME "GoogleTranslate.exe"
!define PRODUCT_NAME "Google Translate"
!define PRODUCT_NAME_EN "Google Translate"
!define PRODUCT_PUBLISHER "aceui"
!define PRODUCT_WEB_SITE "http://www.aceui.cn"
!define PRODUCT_2345WEB_SITE "http://www.2345.com/?k652511569"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\${MAIN_APP_NAME}"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_AUTORUN_KEY "Software\Microsoft\Windows\CurrentVersion\Run"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
!define MUI_ICON "resouce\115Browser\app.ico"
!define MUI_UNICON "resouce\115Browser\app.ico"
!define UNINSTALL_DIR "$TEMP\ACEUI\aceuiStep"
;刷新关联图标
!define SHCNE_ASSOCCHANGED 0x08000000
!define SHCNF_IDLIST 0
; 安装不需要重启
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
; 设置文件覆盖标记
SetOverwrite on
; 设置压缩选项
SetCompress auto
; 选择压缩方式
SetCompressor /SOLID lzma
SetCompressorDictSize 32
; 设置数据块优化
SetDatablockOptimize on
; 设置在数据中写入文件时间
SetDateSave on
;设置Unicode 编码 3.0以上版本支持
Unicode false
; 是否允许安装在根目录下
AllowRootDirInstall false
Name "${PRODUCT_NAME}"
OutFile "output\115Browser.exe"
InstallDir "$PROGRAMFILES\Google Translate"
InstallDirRegKey HKLM "${PRODUCT_UNINST_KEY}" "UninstallString"
;Request application privileges for Windows Vista
RequestExecutionLevel admin
;文件版本声明-开始
VIProductVersion ${PRODUCT_VERSION}
VIAddVersionKey /LANG=2052 "ProductName" "Google Translate"
VIAddVersionKey /LANG=2052 "Comments" "Google Translate"
VIAddVersionKey /LANG=2052 "CompanyName" "Aceui"
VIAddVersionKey /LANG=2052 "LegalTrademarks" "Google Translate"
VIAddVersionKey /LANG=2052 "LegalCopyright" "Google Translate."
VIAddVersionKey /LANG=2052 "FileDescription" "Google Translate install"
VIAddVersionKey /LANG=2052 "FileVersion" ${PRODUCT_VERSION}
;文件版本声明-结束

; 引入的头文件
!include  "MUI.nsh"
!include "FileFunc.nsh"
;Languages 
!insertmacro MUI_LANGUAGE "SimpChinese"
;初始化数据

; 安装和卸载页面
Page         custom     InstallProgress
Page         instfiles  "" InstallShow
UninstPage   custom     un.UninstallProgress
UninstPage   instfiles	""	un.UninstallNow
Function .onInit
 ;创建互斥防止重复运行
  System::Call 'kernel32::CreateMutexA(i 0, i 0, t "ACEUIInstall") i .r1 ?e'
  Pop $R0
  StrCmp $R0 0 +3
    MessageBox MB_OK|MB_ICONEXCLAMATION "有一个 Google Translate 安装向导已经运行！"
    Abort

  KillProcDLL::KillProc "${MAIN_APP_NAME}"     ;强制结束进程

  SetOutPath "${UNINSTALL_DIR}"
  File /r /x *.db ".\resouce\115Browser\*.*"
  ;初始化数据  安装目录
 
  ReadRegStr $installPath HKLM "SOFTWARE\aceui\115browser" "installDir"
  ${If} $installPath == ""
    ;初始化安装位置 $APPDATA
    StrCpy $installPath "$PROGRAMFILES\Google Translate"
  ${EndIf}
FunctionEnd

Function InstallProgress
   nsSkinEngine::InitNSISSkinEngine /NOUNLOAD "${UNINSTALL_DIR}" "InstallPackages.xml" "WizardTab" "false" "115浏览器" "7B4D2AD97EC46776D7504B1F501B17483E5EFD52B3BA9E8BE9D6401E4F742E19B822CC7DDF6FC224A5D8AAFB9FFC899B" "app.ico" "true"
   Pop $Dialog
   ;初始化MessageBox窗口
   nsSkinEngine::InitNSISMessageBox "MessageBox.xml" "TitleLab" "TextLab" "CloseBtn" "YESBtn" "NOBtn"
   Pop $MessageBoxHandle
   
   ;关闭按钮绑定函数
   nsSkinEngine::FindControl "InstallTab_sysCloseBtn"
   Pop $0
   ${If} $0 == "-1"
    MessageBox MB_OK "Do not have InstallTab_sysCloseBtn"
   ${Else}
    GetFunctionAddress $0 OnInstallCancelFunc
    nsSkinEngine::OnControlBindNSISScript "InstallTab_sysCloseBtn" $0
   ${EndIf}

   ;------------------------安装界面-----------------------

    ;安装路径编辑框设定数据
   nsSkinEngine::FindControl "InstallTab_InstallFilePath"
   Pop $0
   ${If} $0 == "-1"
    MessageBox MB_OK "Do not have InstallTab_InstallFilePath"
   ${Else}
   
    GetFunctionAddress $0 OnTextChangeFunc
    nsSkinEngine::OnControlBindNSISScript "InstallTab_InstallFilePath" $0
    nsSkinEngine::SetControlData "InstallTab_InstallFilePath" $installPath "text"
    Call OnTextChangeFunc
   ${EndIf}

   ;安装路径浏览按钮绑定函数
   nsSkinEngine::FindControl "InstallTab_SelectFilePathBtn"
   Pop $0
   ${If} $0 == "-1"
    MessageBox MB_OK "Do not have InstallTab_SelectFilePathBtn button"
   ${Else}
    GetFunctionAddress $0 OnInstallPathBrownBtnFunc    
        nsSkinEngine::OnControlBindNSISScript "InstallTab_SelectFilePathBtn"  $0
   ${EndIf}
   
	;展开自定义选项
   nsSkinEngine::FindControl "CustomOptionsCheckBox"
   ${If} $0 == "-1"
    MessageBox MB_OK "Do not have CustomOptionsCheckBox"
   ${Else}
    GetFunctionAddress $0 OnCheckChanged    
        nsSkinEngine::OnControlBindNSISScript "CustomOptionsCheckBox"  $0
   ${EndIf}
   
   ;是否同意
   nsSkinEngine::FindControl "acceptCheckBox"
   ${If} $0 == "-1"
    MessageBox MB_OK "Do not have acceptCheckBox"
   ${Else}
    GetFunctionAddress $0 acceptCheckChangedFunc    
        nsSkinEngine::OnControlBindNSISScript "acceptCheckBox"  $0
   ${EndIf}
   
   ;使用协议
   nsSkinEngine::FindControl "acceptBtn"
   Pop $0
   ${If} $0 == "-1"
    MessageBox MB_OK "Do not have acceptBtn button"
   ${Else}
    GetFunctionAddress $0 acceptPageFunc    
        nsSkinEngine::OnControlBindNSISScript "acceptBtn"  $0
   ${EndIf}
   
   ;使用协议确定
   nsSkinEngine::FindControl "okAcceptBtn"
   Pop $0
   ${If} $0 == "-1"
    MessageBox MB_OK "Do not have okAcceptBtn button"
   ${Else}
    GetFunctionAddress $0 acceptOkFunc    
        nsSkinEngine::OnControlBindNSISScript "okAcceptBtn"  $0
   ${EndIf}
   
   ;开始安装按钮绑定函数
   nsSkinEngine::FindControl "InstallBtn"
   Pop $0
   ${If} $0 == "-1"
    MessageBox MB_OK "Do not have InstallBtn button"
   ${Else}
    GetFunctionAddress $0 InstallPageFunc    
        nsSkinEngine::OnControlBindNSISScript "InstallBtn"  $0
   ${EndIf}
   ;--------------------------------------完成页面----------------------------------
   nsSkinEngine::FindControl "CompleteTab_CompleteBtn"
   Pop $0
   ${If} $0 == "-1"
    MessageBox MB_OK "Do not have CompleteTab_CompleteBtn button"
   ${Else}
    GetFunctionAddress $0 OnCompleteBtnFunc    
        nsSkinEngine::OnControlBindNSISScript "CompleteTab_CompleteBtn"  $0
   ${EndIf}
   ;--------------------------------------窗体显示-----------------------------------
   Call OnCheckChanged
   nsSkinEngine::SetControlData "defaultAppCheckBox"  "true"  "Checked"
   nsSkinEngine::SetControlData "acceptCheckBox"  "true"  "Checked"
   nsSkinEngine::SetControlData "deskShortCheckBox"  "true"  "Checked"
   nsSkinEngine::SetControlData "2345CheckBox"  "true"  "Checked"
   nsSkinEngine::SetControlData "autoCheckBox"  "true"  "Checked"
   nsSkinEngine::SetControlData "userFuckCheckBox"  "true"  "Checked"
   nsSkinEngine::RunNSISSkinEngine
FunctionEnd

Function OnNextBtnFunc
   nsSkinEngine::NSISSendMessage $Dialog WM_NSISNEXT
FunctionEnd

Function OnInstallCancelFunc
    nsSkinEngine::ExitNSISSkinEngine
FunctionEnd

Function UpdateFreeSpace
  ${GetRoot} $INSTDIR $0
  StrCpy $1 "Bytes"

  System::Call kernel32::GetDiskFreeSpaceEx(tr0,*l,*l,*l.r0)
   ${If} $0 &gt; 1024
   ${OrIf} $0 &lt; 0
      System::Int64Op $0 / 1024
      Pop $0
      StrCpy $1 "KB"
      ${If} $0 &gt; 1024
      ${OrIf} $0 &lt; 0
     System::Int64Op $0 / 1024
     Pop $0
     StrCpy $1 "MB"
     ${If} $0 &gt; 1024
     ${OrIf} $0 &lt; 0
        System::Int64Op $0 / 1024
        Pop $0
        StrCpy $1 "GB"
     ${EndIf}
      ${EndIf}
   ${EndIf}

   StrCpy $FreeSpaceSize  "$0$1"
FunctionEnd

Function FreshInstallDataStatusFunc
    ;更新磁盘空间文本显示
   nsSkinEngine::FindControl "InstallTab_FreeSpace"
   Pop $0
   ${If} $0 == "-1"
    MessageBox MB_OK "Do not have InstallTab_FreeSpace"
   ${Else}
    nsSkinEngine::SetControlData "InstallTab_FreeSpace"  $FreeSpaceSize  "text"
   ${EndIf}
   ;路径是否合法（合法则不为0Bytes）
   ${If} $FreeSpaceSize == "0Bytes"
    nsSkinEngine::SetControlData "InstallTab_InstallBtn" "false" "enable"
   ${Else}
    nsSkinEngine::SetControlData "InstallTab_InstallBtn" "true" "enable"
   ${EndIf}
FunctionEnd

Function OnTextChangeFunc
   ; 改变可用磁盘空间大小
   nsSkinEngine::GetControlData InstallTab_InstallFilePath "text"
   Pop $0
   ;MessageBox MB_OK $0
   StrCpy $INSTDIR $0

   ;重新获取磁盘空间
   Call UpdateFreeSpace
   Call FreshInstallDataStatusFunc
FunctionEnd

Function OnInstallPathBrownBtnFunc
   nsSkinEngine::GetControlData "InstallTab_InstallFilePath" "text" ;
   Pop $installPath
   nsSkinEngine::SelectFolderDialog "请选择文件夹" $installPath
   Pop $installPath

   StrCpy $0 $installPath
   ${If} $0 == "-1"
   ${Else}
      StrCpy $INSTDIR "$installPath\${PRODUCT_NAME_EN}"
      ;设置安装路径编辑框文本
      nsSkinEngine::FindControl "InstallTab_InstallFilePath"
      Pop $0
      ${If} $0 == "-1"
     MessageBox MB_OK "Do not have Wizard_InstallPathBtn4Page2 button"
      ${Else}
     ;nsSkinEngine::SetText2Control "InstallTab_InstallFilePath"  $installPath
     StrCpy $installPath $INSTDIR
     nsSkinEngine::SetControlData "InstallTab_InstallFilePath"  $installPath  "text"
      ${EndIf}
   ${EndIf}

   ;重新获取磁盘空间
   Call UpdateFreeSpace
   Call FreshInstallDataStatusFunc
FunctionEnd

Function OnCheckChanged
    nsSkinEngine::GetControlData "CustomOptionsCheckBox" "Checked" ;
    Pop $0
    ${If} $0 == "1"
	nsSkinEngine::NSISResize "445" "608"
	nsSkinEngine::SetControlData "customVer"  "true"  "visible"
	${Else}
	nsSkinEngine::NSISResize "445" "462"
	nsSkinEngine::SetControlData "customVer"  "false"  "visible"
	${EndIf}
FunctionEnd

Function acceptCheckChangedFunc
	nsSkinEngine::GetControlData "acceptCheckBox" "Checked" ;
    Pop $0
    ${If} $0 == "1"
		nsSkinEngine::SetControlData "InstallBtn"  "true"  "enable"
	${Else}
		nsSkinEngine::SetControlData "InstallBtn"  "false"  "enable"
    ${EndIf}
FunctionEnd

Function acceptPageFunc
	nsSkinEngine::SetControlData "windowbk"  "1"  "TabCurrentIndexInt"
	nsSkinEngine::ShowLicense "acceptInfo" "license.txt"
FunctionEnd

Function acceptOkFunc
	nsSkinEngine::SetControlData "windowbk"  "0"  "TabCurrentIndexInt"
FunctionEnd

Function InstallPageFunc
    nsSkinEngine::SetControlData "InstallTab_sysCloseBtn"  "false"  "enable"
	nsSkinEngine::NSISResize "445" "462"
	nsSkinEngine::SetControlData "customVer"  "false"  "visible"
    Call OnNextBtnFunc
    ;设置进度条
    nsSkinEngine::SetControlData "CompleteTab_RunAppCheckBox"  "true" "Checked" ;默认勾选运行程序
    nsSkinEngine::FindControl "InstallProgressBar"
      Pop $0
      ${If} $0 == "-1"
     MessageBox MB_OK "Do not have InstallProgressBar"
      ${Else}
     nsSkinEngine::SetControlData "InstallProgressBar"  "0"  "ProgressInt"
     nsSkinEngine::SetControlData "progressText"  "0%"  "text"
     nsSkinEngine::NSISStopMsgLoop
     ${EndIf} 
FunctionEnd

Function InstallShow
     nsSkinEngine::FindControl "InstallProgressBar"
      Pop $0
      ${If} $0 == "-1"
     MessageBox MB_OK "Do not have InstallProgressBar"
      ${Else}
     nsSkinEngine::NSISBindingProgress "InstallProgressBar" "progressText"
	 ${EndIf}
FunctionEnd

Section InstallFiles
  SetOutPath "$INSTDIR"
  SetOverwrite ifnewer
  File /r "bin\*.*"
SectionEnd

Section RegistKeys
    WriteUninstaller "$INSTDIR\uninst.exe"
    WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\${MAIN_APP_NAME}"
    WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
    WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
    WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\${MAIN_APP_NAME},0"
    WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
    WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
    WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
SectionEnd

Section CreateShorts
    WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
    SetShellVarContext all
    ;创建开始菜单快捷方式
    CreateDirectory "$SMPROGRAMS\Google Translate"
    CreateShortCut "$SMPROGRAMS\Google Translate\${PRODUCT_NAME}.lnk" "$INSTDIR\${MAIN_APP_NAME}"
    CreateShortCut "$SMPROGRAMS\Google Translate\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
    CreateShortCut "$SMPROGRAMS\Google Translate\Uninstall.lnk" "$INSTDIR\uninst.exe"
    SetOverwrite ifnewer
	nsSkinEngine::GetControlData "deskShortCheckBox" "Checked" ;
    Pop $0
    ${If} $0 == "1"
      ;创建桌面快捷方式
		CreateShortCut "$DESKTOP\${PRODUCT_NAME}.lnk" "$INSTDIR\${MAIN_APP_NAME}"
    ${EndIf}
    
/* 	CreateShortCut "$QUICKLAUNCH\${PRODUCT_NAME}.lnk" "$INSTDIR\${MAIN_APP_NAME}"
	System::Call 'shell32.dll::ShellExecute(i 0, t "taskbarpin", t "$QUICKLAUNCH\${PRODUCT_NAME}.lnk", i 0, i 0, i 0)  i .r1 ?e' */
    Call RefreshShellIcons
SectionEnd

Section Finish
	nsSkinEngine::SetControlData "InstallTab_sysCloseBtn"  "true"  "enable"
	nsSkinEngine::GetControlData "2345CheckBox" "Checked" ;
    Pop $0
    ${If} $0 == "1"
      ;设置浏览器首页
		WriteRegStr HKCU "Software\Microsoft\Internet Explorer\Main" "Start Page" "${PRODUCT_2345WEB_SITE}"
    ${EndIf}
SectionEnd

Function OnCompleteBtnFunc
    nsSkinEngine::HideNSISSkinEngine
    nsSkinEngine::StopAnimationBkControl
    nsSkinEngine::GetControlData "autoCheckBox" "Checked" ;
    Pop $0
    ${If} $0 == "1"
      WriteRegStr HKCU "${PRODUCT_AUTORUN_KEY}" "${PRODUCT_NAME}" "$INSTDIR\${MAIN_APP_NAME} -mini"
    ${EndIf}
	
    Exec '"$INSTDIR\${MAIN_APP_NAME}"'
    nsSkinEngine::ExitNSISSkinEngine "false"
FunctionEnd


Function un.accept
  nsSkinEngine::NSISSendMessage $Dialog WM_NSISOPENURL "http://www.aceui.cn/";
FunctionEnd
;-----------------------------------------------------------------------------------------------------------------------------

Function un.onInit
  ;创建互斥防止重复运行
  System::Call 'kernel32::CreateMutexA(i 0, i 0, t "aceuiUnInstall") i .r1 ?e'
  Pop $R0
  StrCmp $R0 0 +3
    MessageBox MB_OK|MB_ICONEXCLAMATION "有一个 115浏览器 卸载向导已经运行！"
    Abort

  SetOutPath "${UNINSTALL_DIR}"
  File /r /x *.db ".\resouce\115Browser\*.*"
  
  KillProcDLL::KillProc "${MAIN_APP_NAME}"     ;强制结束进程
FunctionEnd

Function un.UninstallProgress
    nsSkinEngine::InitNSISSkinEngine /NOUNLOAD "${UNINSTALL_DIR}" "UninstallPackages.xml" "WizardTab" "false" "115浏览器" "7B4D2AD97EC46776D7504B1F501B17483E5EFD52B3BA9E8BE9D6401E4F742E19B822CC7DDF6FC224A5D8AAFB9FFC899B" "app.ico" "true"
   Pop $Dialog
   ;初始化MessageBox窗口
   nsSkinEngine::InitNSISMessageBox "MessageBox.xml" "TitleLab" "TextLab" "CloseBtn" "YESBtn" "NOBtn"
   Pop $MessageBoxHandle
   
   ;关闭按钮绑定函数
   nsSkinEngine::FindControl "sysCloseBtn"
   Pop $0
   ${If} $0 == "-1"
    MessageBox MB_OK "Do not have sysCloseBtn"
   ${Else}
    GetFunctionAddress $0 un.OnUnInstallCancelFunc
    nsSkinEngine::OnControlBindNSISScript "sysCloseBtn" $0
   ${EndIf}
   
   ;取消按钮绑定函数
   nsSkinEngine::FindControl "cancelUninstallBtn"
   Pop $0
   ${If} $0 == "-1"
    MessageBox MB_OK "Do not have cancelUninstallBtn"
   ${Else}
    GetFunctionAddress $0 un.OnUnInstallCancelFunc
    nsSkinEngine::OnControlBindNSISScript "cancelUninstallBtn" $0
   ${EndIf}
 
   ;残忍卸载 okUninstallBtn
   nsSkinEngine::FindControl "okUninstallBtn"
   Pop $0
   ${If} $0 == "-1"
    MessageBox MB_OK "Do not have okUninstallBtn"
   ${Else}
    GetFunctionAddress $0 un.UnInstallPageFunc
    nsSkinEngine::OnControlBindNSISScript "okUninstallBtn" $0
   ${EndIf}
   
   ;卸载完成 completeBtn
   nsSkinEngine::FindControl "completeBtn"
   Pop $0
   ${If} $0 == "-1"
    MessageBox MB_OK "Do not have completeBtn"
   ${Else}
    GetFunctionAddress $0 un.OnCompleteBtnFunc
    nsSkinEngine::OnControlBindNSISScript "completeBtn" $0
   ${EndIf}
   
   ;--------------------------------------窗体显示-----------------------------------
   nsSkinEngine::RunNSISSkinEngine
FunctionEnd

Function un.OnUnInstallCancelFunc
     nsSkinEngine::ExitNSISSkinEngine
FunctionEnd

Function un.OnNextBtnFunc
   nsSkinEngine::NSISSendMessage $Dialog WM_NSISNEXT
FunctionEnd

Function un.UnInstallPageFunc
    Call un.OnNextBtnFunc
    nsSkinEngine::NSISStopMsgLoop
FunctionEnd

Function un.UninstallNow
     nsSkinEngine::FindControl "UnInstallProgressBar"
      Pop $0
      ${If} $0 == "-1"
     MessageBox MB_OK "Do not have UnInstallProgressBar"
      ${Else}
     nsSkinEngine::NSISBindingProgress "UnInstallProgressBar" "progressText"
	 ${EndIf}
FunctionEnd

Section "Uninstall"
    # 设置为当前用户
    SetShellVarContext current
    # 设置为所有用户
    SetShellVarContext all

    Delete "$SMPROGRAMS\Google Translate\*.lnk"
    Delete "$SMPROGRAMS\Google Translate\Uninstall.lnk"
    Delete "$SMPROGRAMS\Google Translate\Website.lnk"
    Delete "$SMPROGRAMS\Google Translate\${PRODUCT_NAME}.lnk"
    Delete "$DESKTOP\${PRODUCT_NAME}.lnk"
    RMDir /r /REBOOTOK  "$SMPROGRAMS\Google Translate"
    RMDir /r /REBOOTOK  "$INSTDIR"
	
	DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
    DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
    DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Google Translate"
    DeleteRegValue HKCU "${PRODUCT_AUTORUN_KEY}" "${PRODUCT_NAME}"
    
SectionEnd

Function un.OnCompleteBtnFunc
    nsSkinEngine::HideNSISSkinEngine
    ;Call un.SendStatistics
    ;Call un.DeleteRegKey ;发送完统计再调用删除key,因为发送可能需要某些键值
    nsSkinEngine::ExitNSISSkinEngine
FunctionEnd

;刷新关联图标
Function RefreshShellIcons
  System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v \
  (${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)'
FunctionEnd

Function .onInstSuccess
FunctionEnd</pre><p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=1426</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NSIS 程序互斥函数</title>
		<link>https://www.softwareace.cn/?p=1424</link>
		<comments>https://www.softwareace.cn/?p=1424#comments</comments>
		<pubDate>Fri, 08 Jan 2016 10:00:56 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[nsis]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=1424</guid>
		<description><![CDATA[[crayon-69fb5c7083fe0312820180/] &#160;]]></description>
				<content:encoded><![CDATA[<p></p><pre class="crayon-plain-tag">/************************
      CheckMutex.nsi
************************/
;NSIS 安装程序与卸载程序互相检查互斥的例子
;编写：zhfi
#定义自己的互斥名称：#
#注意安：装程序不能与卸载程序相同！#
!define MyMutex_Install     "MyMutex_Install"
!define MyMutex_UnInstall   "MyMutex_UnInstall"

;--------------------------------
;Include Modern UI

!include "MUI.nsh"
!include "LogicLib.nsh"

;--------------------------------
;General

  ;Name and file
  Name "Mutex Test"
  OutFile "Mutex.exe"

;--------------------------------
#添加安装页面：#
  !insertmacro MUI_PAGE_Welcome
  !insertmacro MUI_PAGE_InstFiles
  !insertmacro MUI_PAGE_Finish
#添加卸载页面：#
  !insertmacro MUI_UNPAGE_Welcome
  !insertmacro MUI_UNPAGE_InstFiles
  !insertmacro MUI_UNPAGE_Finish

;--------------------------------
;加入语言文件
 
  !insertmacro MUI_LANGUAGE "SimpChinese"

;--------------------------------
;安装程序部分

Function .onInit
InitPluginsDir
Call CreateMutex
FunctionEnd

Function CreateMutex
#检查安装互斥：#
ReCheck:
  System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${MyMutex_Install}") i .R1 ?e'
Pop $R0
  System::Call 'kernel32::CloseHandle(i R1) i.s'
#检查卸载互斥：#
  System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${MyMutex_UnInstall}") i .R3 ?e'
Pop $R2
  System::Call 'kernel32::CloseHandle(i R3) i.s'
#判断安装/卸载互斥的存在#
${If} $R0 != 0
  MessageBox MB_RetryCancel|MB_ICONEXCLAMATION "安装程序已经运行！" IdRetry ReCheck
Quit
${ElseIf} $R2 != 0
  MessageBox MB_RetryCancel|MB_ICONEXCLAMATION "卸载程序已经运行！" IdRetry ReCheck
Quit
${Else}
#创建安装互斥：#
  System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${MyMutex_Install}") i .R1 ?e'
Pop $R0
  StrCmp $R0 0 +2
Quit
${EndIf}
FunctionEnd

Section Install
  SetOutPath $EXEDIR
  WriteUninstaller "$EXEDIR\Uninstall.exe"
SectionEnd

;--------------------------------
;卸载程序部分

Function un.onInit
InitPluginsDir
Call un.CreateMutex
FunctionEnd

Function Un.CreateMutex
#检查安装互斥：#
ReCheck:
  System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${MyMutex_Install}") i .R1 ?e'
Pop $R0
  System::Call 'kernel32::CloseHandle(i R1) i.s'
#检查卸载互斥：#
CheckUnInstall:
  System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${MyMutex_UnInstall}") i .R3 ?e'
Pop $R2
  System::Call 'kernel32::CloseHandle(i R3) i.s'
#判断安装/卸载互斥的存在#
${If} $R0 != 0
  MessageBox MB_RetryCancel|MB_ICONEXCLAMATION "安装程序已经运行！" IdRetry ReCheck
Quit
${ElseIf} $R2 != 0
  MessageBox MB_RetryCancel|MB_ICONEXCLAMATION "卸载程序已经运行！" IdRetry ReCheck
Quit
${Else}
#创建卸载互斥：#
  System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${MyMutex_UnInstall}") i .R1 ?e'
Pop $R0
  StrCmp $R0 0 +2
Quit
${EndIf}
FunctionEnd

Section Uninstall
  SetOutPath $EXEDIR
  Delete "$EXEDIR\Uninstall.exe"
SectionEnd

#脚本结束！#</pre><p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=1424</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NSIS皮肤插件 nsSkinEngine 免费</title>
		<link>https://www.softwareace.cn/?p=1385</link>
		<comments>https://www.softwareace.cn/?p=1385#comments</comments>
		<pubDate>Wed, 02 Sep 2015 03:08:22 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[nsis]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=1385</guid>
		<description><![CDATA[分享一款NSIS 皮肤插件，功能强大，（duilib二次开发），动画，异性，阴影 API Wiki http: [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>分享一款NSIS 皮肤插件，功能强大，（duilib二次开发），动画，异性，阴影</p>
<p>API Wiki</p>
<p><a href="http://www.aceui.cn/api/index.php" target="_blank">http://www.aceui.cn/api/index.php</a></p><pre class="crayon-plain-tag">所有插件或接口怎么收费?
&nbsp;&nbsp;&nbsp;&nbsp;永久免费！并持续更新。
为什么我使用插件后报错?
&nbsp;&nbsp;&nbsp;&nbsp;插件为U版，请先确认自己的NSIS版本。建议使用例子中的一键打包环境。
插件依赖其他DLL或者环境吗?
&nbsp;&nbsp;&nbsp;&nbsp;插件纯win32 C++编写，互不依赖。</pre><p></p><pre class="crayon-plain-tag">插件下载地址： &lt;a style=&quot;color: #337ab7;&quot; href=&quot;http://pan.baidu.com/s/1eQDBQeA&quot; target=&quot;_blank&quot;&gt;百度网盘&lt;/a&gt;
			例子下载地址： &lt;a style=&quot;color: #337ab7;&quot; href=&quot;http://pan.baidu.com/s/1kTKTmZX&quot; target=&quot;_blank&quot;&gt;百度网盘&lt;/a&gt;</pre><p></p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=1385</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>调试 NSIS 插件</title>
		<link>https://www.softwareace.cn/?p=1320</link>
		<comments>https://www.softwareace.cn/?p=1320#comments</comments>
		<pubDate>Sat, 09 May 2015 08:37:12 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[nsis]]></category>
		<category><![CDATA[win32]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=1320</guid>
		<description><![CDATA[[crayon-69fb5c70843f6560086267/] &#160;]]></description>
				<content:encoded><![CDATA[<p></p><pre class="crayon-plain-tag">1.dll 入口 写个 messagebox,下一行 设置个断点
2.编译debug 版本
3.复制dll 到 nsis 的plugin 目录
4.编译nsis 得到 exe
5.运行exe 弹出第一步的messagebox
6.vs 附加进程 到 此exe 进程
7.关闭messagebox ,即可进入调试</pre><p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=1320</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows 下msvc2010编译 NSIS 2.46</title>
		<link>https://www.softwareace.cn/?p=1287</link>
		<comments>https://www.softwareace.cn/?p=1287#comments</comments>
		<pubDate>Wed, 01 Apr 2015 05:56:37 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[nsis]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=1287</guid>
		<description><![CDATA[按照 NSIS 帮助文档的说法，要构建 NSIS 首先安装 Python 和 SCons。 1、从NSIS 官 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>按照 NSIS 帮助文档的说法，要构建 NSIS 首先安装 <a style="color: #ff8373;" href="http://www.python.org/" rel="nofollow">Python</a> 和 <a style="color: #ff8373;" href="http://www.scons.org/" rel="nofollow">SCons</a>。</p>
<p>1、从NSIS 官方网站 <a style="color: #ff8373;" href="http://sourceforge.net/projects/nsis/files/" rel="nofollow">http://sourceforge.net/projects/nsis/files/</a> 下载 NSIS 2.46 的源代码 zip 包，解压到 C:\nsis-2.46-src，此次我直接从NSIS的repository checkout源码包。</p>
<p>2、从Python 官方网站 <a style="color: #ff8373;" href="http://www.python.org/getit/" rel="nofollow">http://www.python.org/getit/</a> 下载 Python 2.7.6 安装到 C:\dev\Python27，将此路径添加到系统 PATH 环境变量。</p>
<p>3、从SCons 官方网站 <a style="color: #ff8373;" href="http://sourceforge.net/projects/scons/files/" rel="nofollow">http://sourceforge.net/projects/scons/files/</a> 下载 scons-2.3.0-setup 安装（自动默认到 Python 的子目录），将路径 C:\dev\Python27\Scripts 添加到系统 PATH 环境变量。</p>
<p>4、由于 NSIS 的 Menu 采用 wxWidgets 编写，因此去 wxWidgets 官方网站 <a style="color: #ff8373;" href="http://www.wxwidgets.org/downloads/" rel="nofollow">http://www.wxwidgets.org/downloads/</a> 下载 wxWidgets-2.9.5.zip解压到 C:\dev\wxWidgets。新建环境变量 WXWIN，值为该路径 C:\dev\wxWidgets</p>
<p>5、在进行下一步之前，确定你的系统有MSVC的编译环境，我此次编译使用的是msvc010。</p>
<p>6、进入 NSIS 的 Menu 目录，C:\nsis-2.46-src\Contrib\NSIS Menu\wx，Visual Studio Command Prompt (2010)<span style="color: #ff0000;">命令行</span>下启动 wxbuild.bat，先编译 wxWidgets程序，等待 10 分钟。</p>
<p>7、进入 NSIS 目录 C:\nsis-2.46-src\Contrib\NSIS Menu\，修改 SConscript文件,以下是这个文件的patch</p><pre class="crayon-plain-tag">--- C:/SConscript   星期三 四月 10 17:13:20 2013
+++ C:/nsis-2.46-src/Contrib/NSIS Menu/SConscript   星期四 十一月 28 18:29:30 2013
@@ -13,17 +13,27 @@ resources = Split("""
 rc = 'nsismenu/nsismenu.rc'
  
 libs = Split("""
-   advapi32
-   comctl32
+   kernel32
+   user32
    gdi32
+   comdlg32
+   winspool
+   winmm
    shell32
-   user32
+   comctl32
+   ole32
+   oleaut32
+   uuid
+   rpcrt4
+   advapi32
+   wsock32
+   wininet
 """)
  
 if env['UNICODE']:
-   libs.append(["wxbase29u", "wxmsw29u_core", "wxmsw29u_html"])
+   libs.append(["wxbase29u", "wxmsw29u_core", "wxmsw29u_html", "wxpng", "wxjpeg", "wxtiff", "wxzlib", "wxexpat"])
 else:
-   libs.append(["wxbase29", "wxmsw29_core", "wxmsw29_html"])
+   libs.append(["wxbase29", "wxmsw29_core", "wxmsw29_html", "wxpng", "wxjpeg", "wxtiff", "wxzlib", "wxexpat"])
  
 html = Split("""
    #Menu/index.html</pre><p>8、回到 NSIS 主目录 C:\nsis-2.46-src，撰写一个编译脚本build.bat:</p><pre class="crayon-plain-tag">set ZLIB_W32=C:\dev\zlib-1.2.8
set WXWIN=C:\devfolder\wxWidgets-2.9.5
 
set MSVS_VERSION = 10.0
scons NSIS_CONFIG_LOG=yes NSIS_MAX_STRLEN=8192 dist-zip
pause</pre><p>Visual Studio Command Prompt (2010)<span style="color: #ff0000;">命令行</span>下启动build.bat：等待 5-10 分钟。在 NSIS主目录下会躺着一个 zip 包，就是它了。</p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=1287</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
