简单易用的安装文件制作工具NSIS的使用demo示例
SetOutPath $INSTDIR\mplayer
;
; This script is based on VRA.nsi, but it remember the directory,
; has uninstall support and (optionally) installs start menu shortcuts.
;
; It will install VRA.nsi into a directory that the user selects,
;--------------------------------
; The name of the installer
Name "VRA installer"
InstallDir "C:\VRA"
; The file to write
; OutFile "example2.exe"
OutFile "VRA_Installer.exe"
RequestExecutionLevel admin
; The default installation directory
;InstallDir $PROGRAMFILES\VRA
; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically)
InstallDirRegKey HKLM "Software\VRA" "Install_Dir"
; Request application privileges for Windows Vista
RequestExecutionLevel admin
;--------------------------------
; Pages
Page components
Page directory
Page instfiles
UninstPage uninstConfirm
UninstPage instfiles
;--------------------------------
; The stuff to install
Section "VRA (required)"
SectionIn RO
; Set output path to the installation directory.
SetOutPath $INSTDIR
; Put file there
;File "example2.nsi"
File "bz2.pyd"
File "MSVCP90.dll"
File "MSVCR90.dll"
File "msvcrt.dll"
File "pycpuid._pycpuid.pyd"
File "python27.dll"
File "pywintypes27.dll"
File "screen_left.bmp"
File "select.pyd"
File "unicodedata.pyd"
File "user32.dll"
File "VRA.exe"
File "VRA.exe.manifest"
File "win32api.pyd"
File "win32evtlog.pyd"
File "wx._controls_.pyd"
File "wx._core_.pyd"
File "wx._gdi_.pyd"
File "wx._misc_.pyd"
File "wx._windows_.pyd"
File "wxbase30u_net_vc90.dll"
File "wxbase30u_vc90.dll"
File "wxmsw30u_adv_vc90.dll"
File "wxmsw30u_core_vc90.dll"
File "wxmsw30u_html_vc90.dll"
File "_ctypes.pyd"
File "_hashlib.pyd"
File "_socket.pyd"
File "_ssl.pyd"
File "mplayer.exe"
CreateDirectory $INSTDIR\mplayer
SetOutPath $INSTDIR\mplayer
File "mplayer\config"
SetOutPath $INSTDIR
; Write the installation path into the registry
WriteRegStr HKLM SOFTWARE\VRA "Install_Dir" "$INSTDIR"
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Run" Shell "$INSTDIR\VRA.exe"
; Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VRA" "VRA" "VRA"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VRA" "Uninstall_VRA" '"$INSTDIR\uninstall.exe"'
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VRA" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VRA" "NoRepair" 1
WriteUninstaller "uninstall.exe"
SectionEnd
; Optional section (can be disabled by the user)
Section "Start Menu Shortcuts"
CreateDirectory "$SMPROGRAMS\VRA"
CreateShortCut "$SMPROGRAMS\VRA\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
CreateShortCut "$SMPROGRAMS\VRA\VRA.lnk" "$INSTDIR\VRA.exe" "" "$INSTDIR\VRA.exe" 0
SectionEnd
; Optional section (can be disabled by the user)
Section "Desktop Shortcuts" SectionX
SetShellVarContext current
CreateShortCut "$DESKTOP\VRA.lnk" "$INSTDIR\VRA.exe"
;WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\layers" "$INSTDIR\VRA.exe" "RUNASADMIN"
SectionEnd
;--------------------------------
; Uninstaller
Section "Uninstall"
; Remove registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VRA"
DeleteRegKey HKLM SOFTWARE\VRA
; Remove files and uninstaller
;Delete $INSTDIR\example2.nsi
;Delete $INSTDIR\uninstall.exe
Delete "$INSTDIR\bz2.pyd"
Delete "$INSTDIR\Microsoft.VC90.CRT.manifest"
Delete "$INSTDIR\msvcm90.dll"
Delete "$INSTDIR\msvcp90.dll"
Delete "$INSTDIR\msvcr90.dll"
Delete "$INSTDIR\msvcrt.dll"
Delete "$INSTDIR\pycpuid._pycpuid.pyd"
Delete "$INSTDIR\python27.dll"
Delete "$INSTDIR\pywintypes27.dll"
Delete "$INSTDIR\screen_left.bmp"
Delete "$INSTDIR\select.pyd"
Delete "$INSTDIR\unicodedata.pyd"
Delete "$INSTDIR\user32.dll"
Delete "$INSTDIR\VRA.exe"
Delete "$INSTDIR\VRA.exe.manifest"
Delete "$INSTDIR\win32api.pyd"
Delete "$INSTDIR\win32evtlog.pyd"
Delete "$INSTDIR\wx._controls_.pyd"
Delete "$INSTDIR\wx._core_.pyd"
Delete "$INSTDIR\wx._gdi_.pyd"
Delete "$INSTDIR\wx._misc_.pyd"
Delete "$INSTDIR\wx._windows_.pyd"
Delete "$INSTDIR\wxbase30u_net_vc90.dll"
Delete "$INSTDIR\wxbase30u_vc90.dll"
Delete "$INSTDIR\wxmsw30u_adv_vc90.dll"
Delete "$INSTDIR\wxmsw30u_core_vc90.dll"
Delete "$INSTDIR\wxmsw30u_html_vc90.dll"
Delete "$INSTDIR\_ctypes.pyd"
Delete "$INSTDIR\_hashlib.pyd"
Delete "$INSTDIR\_socket.pyd"
Delete "$INSTDIR\_ssl.pyd"
Delete "$INSTDIR\mplayer.exe"
Delete "$INSTDIR\mplayer\config"
Delete "init.check"
Delete "init.video"
Delete "kamhearing.log"
Delete "player_reg.dll"
Delete "uninstall.exe"
; Remove shortcuts, if any
Delete "$SMPROGRAMS\VRA\*.*"
Delete "$SMPROGRAMS\VRA\VRA.lnk"
; Remove directories used
RMDir "$SMPROGRAMS\VRA"
RMDir "$INSTDIR\mplayer"
RMDir "$INSTDIR"
SectionEnd
简单易用的安装文件制作工具NSIS的使用demo示例的更多相关文章
- 安装文件制作工具Wix概念快速入门
前言 Wix==Windows installer XML 顾名思议. 用于制作WINDOWS安装文件的XML格式的描述文件. 因为其实现方式为基于声明的方式,而非命令的方式. 特整理一下其相关的概念 ...
- NSIS安装程序制作工具判断系统是否安装.NET
前段时间忙了很久的系统总算上线了,由于是WinForm程序不能整个文件夹的发给客户使用.所以必须要打包,记得以前在VS2005中是自带部署功能的.现在换了VS2013那个部署功能完全弄不清方向.最后在 ...
- 简单易用的leetcode开发测试工具(npm)
描述 最近在用es6解leetcode,当问题比较复杂时,有可能修正了新的错误,却影响了前面的流程.要用通用的测试工具,却又有杀鸡用牛刀的感觉,所以就写了个简单易用的leetcode开发测试工具,分享 ...
- Help And Manual 帮助文件制作工具
Help And Manual 简 介 帮助文件制作工具 支持文件格式 26种 其他功能 制作非常专业的使用手册 一个所见即所得的帮助文件制作工具,是市面上功能最强的 WYSIWYG (所见即所 ...
- 推荐一款简单易用线上引流测试工具:GoReplay
一. 引流测试产生背景 日常大部分的测试工作都是在测试环境下,通过模拟用户的行为来对系统进行验证,包括功能以及性能.在这个过程中,你可能会遇到以下问题: 用户访问行为比较复杂,模拟很难和用户行为一致, ...
- ubuntu安装文件比较工具Meld
Meld是一款可视化的文件及目录对比(diff) / 合并 (merge) 工具,通过它你可以对两个或三个文件/目录进行对比,并以图形化的方式显示出它们的不同之处,同时还提供编辑及合并功能,另外还支持 ...
- 基于NSIS脚本开发的安装程序制作软件:易量安装
原文 基于NSIS脚本开发的安装程序制作软件:易量安装 前几天“萝卜”给我推荐了一款安装程序制作工具——易量安装. 易量安装是一款安装程序制作软件,基于著名的NSIS(Nullsoft Scripta ...
- 使用Setup Factory安装包制作工具制作安装包
在我们开发完软件后,除了极个别案例我们把整个目录复制给客户用外,我们一般都需要做成安装包,方便整个软件的部署操作,以安装包的部署操作可能简单的是复制文件,也可能包括一些注册表.数据库等额外的操作,不过 ...
- 安装包制作工具 SetupFactory使用1 详解
2014-11-19 Setup Factory 是一个强大的安装程序制作工具.提供了安装制作向导界面,即使你对安装制作不了解,也可以生成专业性质的安装程序.可建立快捷方式,也可直接在 Windows ...
随机推荐
- MyCat - 使用篇
Mycat水平拆分之十种分片规则: http://www.cnblogs.com/756623607-zhang/p/6656022.html 数据库路由中间件MyCat - 使用篇(5) 配置MyC ...
- 【转】java 线程的几种状态
java thread的运行周期中, 有几种状态, 在 java.lang.Thread.State 中有详细定义和说明: NEW 状态是指线程刚创建, 尚未启动 RUNNABLE 状态是线程正在正常 ...
- oracle数据分组
一,什么是分组函数 分组函数作用于一组数据,并对一组数据返回一个值 二,分组函数类型 Avg ,count,max,min,stddev(标准方差),sum. 函数名称 函数描述 Count 返回找到 ...
- Windows平台查看端口占用的程序
一.方法:管理员权限打开Cmd窗口:netstat -obna
- app_offline.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DT ...
- directive完成UI渲染后执行JS
ui-view有相应的$viewContentLoaded http://blog.csdn.net/xinshangshangxin/article/details/44700813 ng-repe ...
- CyclicBarrier的用法
CyclicBarrier是一个同步辅助类,它允许一组线程互相等待,直到到达某个公共屏障点 (common barrier point).在涉及一组固定大小的线程的程序中,这些线程必须不时地互相等待, ...
- word2013总是出现未响应卡一下如何解决?
最近在记笔记,word很烦很烦,总是会卡一下,过一会卡一下.本来以为是自动保存后来发现跟自动保存没有关系. 解决方法:禁用硬件图形加速就好了,不行的话再在硬件加速下面有个"使用子像素定位平滑 ...
- Linux(CentOS6.X)安装mysql
首先执行rpm -qa|grep -i mysql检查一下是否已经安装过mysql mysql-libs-5.1.73-5.el6_6.x86_64 可见已经安装了库文件,应该先卸载,不然会出现覆盖错 ...
- http 206请求
1.概要 在客户端表明自己只需要目标URL上的部分资源的时候返回的.这种情况经常发生在客户端继续请求一个未完成的下载的时候(通常是当客户端加载一个体积较大的嵌入文件,比如视屏或PDF文件). 通常在展 ...