; 该脚本使用 HM VNISEdit 脚本编辑器向导产生
; 安装程序初始定义常量
!define PRODUCT_NAME "麻醉PDA"
!define PRODUCT_VERSION "1.0"
!define PRODUCT_PUBLISHER "medicalsystem, Inc."
!define PRODUCT_WEB_SITE "http://www.goudiannao.com/"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\FrameWork3.5.exe"
SetCompressor lzma
; ------ MUI 现代界面定义 (1.67 版本以上兼容) ------
!include "MUI.nsh"
; MUI 预定义常量
!define MUI_ABORTWARNING
!define MUI_ICON "..\vss-anesMobile\MobileModel\doCare.ico"
; 欢迎页面
!insertmacro MUI_PAGE_WELCOME
; 许可协议页面
;!insertmacro MUI_PAGE_LICENSE "..\vss-anesMobile\setup\lic.txt"
; 组件选择页面
!insertmacro MUI_PAGE_COMPONENTS
; 安装目录选择页面
!insertmacro MUI_PAGE_DIRECTORY
; 安装过程页面
!insertmacro MUI_PAGE_INSTFILES
;!define MUI_FINISHPAGE_RUN SetUpFiles
;!insertmacro MUI_PAGE_FINISH
;call SetUpFiles
; 安装完成页面
;!define MUI_FINISHPAGE_RUN "$INSTDIR\FrameWork3.5.exe"
;!insertmacro MUI_PAGE_FINISH
; 安装完成页面
;!define MUI_FINISHPAGE_RUN "$INSTDIR\AnesMobile.exe"
;!insertmacro MUI_PAGE_FINISH
; 安装界面包含的语言设置
!insertmacro MUI_LANGUAGE "SimpChinese"
; 安装预释放文件
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
; ------ MUI 现代界面定义结束 ------
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "Setup.exe"
InstallDir "$PROGRAMFILES\麻醉PDA"
InstallDirRegKey HKLM "${PRODUCT_UNINST_KEY}" "UninstallString"
ShowInstDetails show
Section "FrameWork框架" SEC01
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
File "FrameWork3.5.exe"
SectionEnd
Section "主程序" SEC02
File "AnesMobile.exe"
SectionEnd
Section -Post
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\FrameWork3.5.exe"
SectionEnd
#-- 根据 NSIS 脚本编辑规则,所有 Function 区段必须放置在 Section 区段之后编写,以避免安装程序出现未可预知的问题。--#
; 区段组件描述
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SEC01} ""
!insertmacro MUI_DESCRIPTION_TEXT ${SEC02} ""
!insertmacro MUI_FUNCTION_DESCRIPTION_END
Function .onInstSuccess
Exec '"$INSTDIR\FrameWork3.5.exe"'
Exec '"$INSTDIR\AnesMobile.exe"'
FunctionEnd