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

推荐订阅源

博客园_首页
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
G
Google Developers Blog
B
Blog
Engineering at Meta
Engineering at Meta
阮一峰的网络日志
阮一峰的网络日志
The Register - Security
The Register - Security
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 叶小钗
The Cloudflare Blog
The Hacker News
The Hacker News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
雷峰网
雷峰网
F
Fortinet All Blogs
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
H
Hackread – Cybersecurity News, Data Breaches, AI and More
酷 壳 – CoolShell
酷 壳 – CoolShell
Last Week in AI
Last Week in AI
T
Threat Research - Cisco Blogs
A
About on SuperTechFans
量子位
Recorded Future
Recorded Future
博客园 - 三生石上(FineUI控件)
H
Help Net Security
Help Net Security
Help Net Security
P
Palo Alto Networks Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Troy Hunt's Blog
W
WeLiveSecurity
V
Vulnerabilities – Threatpost
T
The Exploit Database - CXSecurity.com
Know Your Adversary
Know Your Adversary
Apple Machine Learning Research
Apple Machine Learning Research
Scott Helme
Scott Helme
N
News | PayPal Newsroom
AWS News Blog
AWS News Blog
D
DataBreaches.Net
Blog — PlanetScale
Blog — PlanetScale
MongoDB | Blog
MongoDB | Blog
B
Blog RSS Feed
腾讯CDC
J
Java Code Geeks
Microsoft Azure Blog
Microsoft Azure Blog
TaoSecurity Blog
TaoSecurity Blog
GbyAI
GbyAI
Y
Y Combinator Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
D
Docker

博客园 - 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

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