惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V2EX - 技术
V2EX - 技术
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Latest news
Latest news
T
The Exploit Database - CXSecurity.com
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
L
Lohrmann on Cybersecurity
aimingoo的专栏
aimingoo的专栏
B
Blog
T
Threat Research - Cisco Blogs
罗磊的独立博客
Application and Cybersecurity Blog
Application and Cybersecurity Blog
P
Proofpoint News Feed
P
Palo Alto Networks Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
宝玉的分享
宝玉的分享
博客园 - 司徒正美
Google DeepMind News
Google DeepMind News
Blog — PlanetScale
Blog — PlanetScale
T
Tor Project blog
阮一峰的网络日志
阮一峰的网络日志
Last Week in AI
Last Week in AI
Martin Fowler
Martin Fowler
酷 壳 – CoolShell
酷 壳 – CoolShell
Recorded Future
Recorded Future
D
DataBreaches.Net
Y
Y Combinator Blog
大猫的无限游戏
大猫的无限游戏
IT之家
IT之家
B
Blog RSS Feed
Scott Helme
Scott Helme
P
Proofpoint News Feed
V
Vulnerabilities – Threatpost
A
Arctic Wolf
Help Net Security
Help Net Security
L
LINUX DO - 最新话题
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Vercel News
Vercel News
AWS News Blog
AWS News Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
S
Schneier on Security
Hacker News: Ask HN
Hacker News: Ask HN
N
Netflix TechBlog - Medium
L
LangChain Blog
博客园 - 叶小钗
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
M
MIT News - Artificial intelligence
N
News and Events Feed by Topic
Webroot Blog
Webroot Blog
W
WeLiveSecurity

博客园 - YiStudio

在Word中插入图片 DataGridView多列排序 将Word嵌入到自己的程序中 一个非常不错的压缩组件 免费的国产报表Grid++Reprot 使用NSIS制作安装包(1) SharpDevelop2.0 用Firebird .NET Data Provider编写.NET应用程序(2) 用Marathon管理Firebird数据库(2) 用Firebird .NET Data Provider编写.NET应用程序(1) 用Marathon管理Firebird数据库(1) Firebird简介 NDoc修改手记(三) NDoc修改手记(二) NDoc修改手记(一) WebForm中将DataGrid中导出数据的方法 FxCop EXCEL2003中使用XML 动态加载类(动态加载DLL文件)
使用NSIS制作安装包(2)
YiStudio · 2006-04-27 · via 博客园 - YiStudio

一个完整的安装应用程序的脚本。
!include "MUI.nsh"

!define MUI_ABORTWARNING
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\orange-install-nsis.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall-nsis.ico"
!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\orange-nsis.bmp"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\orange-nsis.bmp"
!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_UNFINISHPAGE_NOAUTOCLOSE

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH

!insertmacro MUI_LANGUAGE "SimpChinese"

!define PRODUCT_NAME $InstallName
!define PRODUCT_VERSION "1.0"
!define PRODUCT_PUBLISHER "YiStudio"

InstallDir "$PROGRAMFILES\YiStudio\MIS\"
BrandingText "YiStudio"
ShowInstDetails show
ShowUnInstDetails show

Name $InstallName
OutFile "ModernUI.exe"

var "InstallName"
var "LinkName"
var "ApplicationName"

Function .onInit
    StrCpy $InstallName "XXX信息管理系统"
    StrCpy $LinkName "XXX信息管理系统.lnk"
    StrCpy $ApplicationName "MIS.exe"
FunctionEnd

Section "MainSection" SECMain
    SetOverwrite ifnewer
    ;程序运行所需的所有东西
    ;含有文件夹的
    SetOutPath "$INSTDIR\XML"
    File /r /x .svn D:\SharpDevelop2\MIS\Main\bin\Debug\XML\*.*
    ;可执行程序等
    SetOutPath "$INSTDIR"
    File /r /x .svn D:\SharpDevelop2\MIS\Main\bin\Debug\*.*

    CreateDirectory "$SMPROGRAMS\$InstallName"
    CreateShortCut "$SMPROGRAMS\$InstallName\$LinkName" "$INSTDIR\$ApplicationName"
    CreateShortCut "$DESKTOP\$LinkName" "$INSTDIR\$ApplicationName"

    WriteUninstaller "$INSTDIR\uninst.exe"
    CreateShortCut "$SMPROGRAMS\$InstallName\卸载$LinkName" "$INSTDIR\uninst.exe"

    Exec "$INSTDIR\MIS.exe"
SectionEnd
;这是一个特殊的Section 要包括卸载程序的话必须有此Section 且Section的名字就是Uninstall
Section Uninstall
    Delete "$DESKTOP\XXX信息管理系统.lnk"
    Delete "$SMPROGRAMS\XXX信息管理系统\*.*"

    SetOutPath "$DESKTOP"

    RMDir "$SMPROGRAMS\XXX信息管理系统"
    RMDir /r "$INSTDIR"
SectionEnd

脚本中红色的部分可实现安装完成后自动运行程序的功能。