脚本:EasyBoot 5.1.2.586

优质
小牛编辑
129浏览
2023-12-01
;该脚本使用 HM VNISEdit 脚本编辑器向导产生

!include "MUI.nsh"
; 安装程序初始定义常量
!define PRODUCT_NAME "EasyBoot"
!define PRODUCT_VERSION "5.1.2.586"
!define PRODUCT_PUBLISHER "(c) 2002-2008 EZB Systems, Inc."
!define PRODUCT_WEB_SITE "http://www.ezbsystems.com"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\EasyBoot.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
!define MUI_WELCOMEFINISHPAGE_BITMAP "C:\2.bmp"

!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"
!define MUI_WELCOMEPAGE_TITLE "欢迎使用 EasyBoot启动易 安装向导"
!define MUI_WELCOMEPAGE_TEXT "  EasyBoot(已注册)是一款集成化的中文光盘启动菜单制作工具,它可以制作光盘启动菜单、自动生成启动文件、并生成可启动ISO文件\r\n  CDIMAGE 光盘优化工具 \r\n  Create_MultiBoot_Folders_And_Files  CMBFAF 系统启动组制作工具\r\n  原程序来自网络,版权归原作者所有\r\n\r\n  打包作者: Nonenever\r\n  \r\n  电子邮件: nonenever@126.com\r\n \r\n  技术支持: 梦想吧联盟论坛www.dreams8.com\r\n \r\n  有任何问题或者建议,欢迎提示和指正^_^ \r\n\r\n$_CLICK"


!define MUI_COMPONENTSPAGE_SMALLDESC
   
SetCompressor LZMA 
InstType "推荐安装"
InstType "完全安装"
InstType "精简安装"

; ------ MUI 现代界面定义 (1.67 版本以上兼容) ------
!include "MUI.nsh"



; MUI 预定义常量
!define MUI_ABORTWARNING
!define MUI_ICON "1.ico"
!define MUI_UNICON "2.ICO"

; 欢迎页面
!insertmacro MUI_PAGE_WELCOME
; 许可协议页面
!insertmacro MUI_PAGE_LICENSE "EasyBoot\License.txt"
; 组件选择页面
!insertmacro MUI_PAGE_COMPONENTS
; 安装目录选择页面
!insertmacro MUI_PAGE_DIRECTORY
; 开始菜单设置页面
var ICONS_GROUP
!define MUI_STARTMENUPAGE_NODISABLE
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "EasyBoot"
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}"
!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP
; 安装过程页面
!insertmacro MUI_PAGE_INSTFILES
; 安装完成页面
!define MUI_FINISHPAGE_RUN "$INSTDIR\EasyBoot.exe"

!insertmacro MUI_PAGE_FINISH

; 安装卸载过程页面
!insertmacro MUI_UNPAGE_INSTFILES

; 安装界面包含的语言设置
!insertmacro MUI_LANGUAGE "SimpChinese"

; 安装预释放文件
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS

  VIProductVersion "5.1.2.586"
  VIAddVersionKey /LANG=2052 "ProductName" "EasyBoot"
  VIAddVersionKey /LANG=2052 "Comments" "EasyBoot5.1.2.586(已注册给Nonenever) CDIMAGE2.47 & Create_MultiBoot_Folders_And_Files"
  VIAddVersionKey /LANG=2052 "CompanyName" "EZB Systems(Nonenever打包制作)"
  VIAddVersionKey /LANG=2052 "LegalCopyright" "(c) 2002-2008 EZB Systems"
  VIAddVersionKey /LANG=2052 "FileDescription" "EasyBoot5.1.2.586(已注册给Nonenever) CDIMAGE2.47 & Create_MultiBoot_Folders_And_Files集成化的中文光盘启动菜单制作工具"
  VIAddVersionKey /LANG=2052 "FileVersion" "5.1.2.586"
; ------ MUI 现代界面定义结束 ------

Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "Setup.exe"
InstallDir "$PROGRAMFILES\EasyBoot"
InstallDirRegKey HKLM "${PRODUCT_UNINST_KEY}" "UninstallString"
ShowInstDetails show
ShowUnInstDetails show
BrandingText "By Nonenever 电子邮件:nonenever@126.com  梦想吧联盟论坛 www.dreams8.com"

SectionGroup /e "EasyBoot"  SEC14

Section "!EasyBoot主程序" SEC01
  SectionIn 1 2 3 RO 
  SetOutPath "$INSTDIR\disk1\ezboot"
  SetOverwrite ifnewer
  File "EasyBoot\disk1\ezboot\back.bm1"
  File "EasyBoot\disk1\ezboot\BACK.BMP"
  File "EasyBoot\disk1\ezboot\bcdw.bin"
  File "EasyBoot\disk1\ezboot\bcdw.txt"
  File "EasyBoot\disk1\ezboot\cdmenu.ezb"
  File "EasyBoot\disk1\ezboot\default.ezb"
  File "EasyBoot\disk1\ezboot\ebback.bmp"
  File "EasyBoot\disk1\ezboot\eblogo.bmp"
  File "EasyBoot\disk1\ezboot\isolinux"
  File "EasyBoot\disk1\ezboot\loader.bin"
  File "EasyBoot\disk1\ezboot\logo.bm1"
  File "EasyBoot\disk1\ezboot\logo.bmp"
  File "EasyBoot\disk1\ezboot\memdisk"
  File "EasyBoot\disk1\ezboot\msldr.bin"
  File "EasyBoot\disk1\ezboot\setup98.img"
  File "EasyBoot\disk1\ezboot\standard.ctb"
  File "EasyBoot\disk1\ezboot\vistaldr.bin"
  File "EasyBoot\disk1\ezboot\w2ksect.bin"
  SetOutPath "$INSTDIR"
  File "EasyBoot\EasyBoot.exe"
  File "EasyBoot\ezboot.dat"
  File "EasyBoot\ezboot.ico"
  File "EasyBoot\NeroBurn.exe"
  SetOutPath "$INSTDIR\resource"
  File "EasyBoot\resource\bootfix.bin"
  File "EasyBoot\resource\cdmenu.bat"
  File "EasyBoot\resource\ezboot.com"
  File "EasyBoot\resource\off.com"
  File "EasyBoot\resource\reboot.com"
  File "EasyBoot\resource\restart.com"
  File "EasyBoot\resource\useemu.com"
  File "EasyBoot\resource\useflp.com"
  File "EasyBoot\resource\w2003.bat"
  File "EasyBoot\resource\w2k.bat"
  File "EasyBoot\resource\wxp.bat"
  
        WriteRegStr   HKCR ".ezb" "" "EasyBoot"                 
        WriteRegStr   HKCR "EasyBoot" "" "EasyBoot 文件"
        WriteRegDWORD HKCR "EasyBoot" "EditFlags" 0x00000000
        WriteRegDWORD HKCR "EasyBoot" "BrowserFlags" 0x00000008
        WriteRegStr   HKCR "EasyBoot\DefaultIcon" "" "$INSTDIR\ezboot.ico"
        WriteRegStr   HKCR "EasyBoot\shell" "" ""
        WriteRegStr   HKCR "EasyBoot\shell\open" "" "用 EasyBoot 打开"
        WriteRegStr   HKCR "EasyBoot\shell\open\command" "" '"$INSTDIR\EasyBoot.exe" "%1"'
        WriteRegStr   HKCR "EasyBoot\shell\open\ddeexec\Application" "" "EasyBoot"
        WriteRegStr   HKCR "EasyBoot\shell\open\ddeexec\Topic" "" "System"
  WriteRegStr   HKCU "Software\EasyBoot Systems\EasyBoot\3.0" "" "$INSTDIR"
        WriteRegStr   HKCU "Software\EasyBoot Systems\EasyBoot\3.0" "AutoLoad" "1"
        WriteRegStr   HKCU "Software\EasyBoot Systems\EasyBoot\3.0" "ImageFileDir" "ezboot"
        WriteRegStr   HKCU "Software\EasyBoot Systems\EasyBoot\3.0" "CDVolumeID" "BootMenu"
        WriteRegStr   HKCU "Software\EasyBoot Systems\EasyBoot\3.0" "PreparerName" "EasyBoot V5.1"
        WriteRegStr   HKCU "Software\EasyBoot Systems\EasyBoot\3.0" "Registration" "eaade5c8dd87afd7d98f91b1a6fcbab4"
        WriteRegStr   HKCU "Software\EasyBoot Systems\EasyBoot\3.0" "UserName" "Nonenever"
        WriteRegStr   HKCU "Software\EasyBoot Systems\EasyBoot\3.0" "PanelLeft" "20"
        WriteRegStr   HKCU "Software\EasyBoot Systems\EasyBoot\3.0" "PanelTop" "130"
        WriteRegStr   HKCU "Software\EasyBoot Systems\EasyBoot\3.0" "PreviewLeft" "340"
        WriteRegStr   HKCU "Software\EasyBoot Systems\EasyBoot\3.0" "PreviewTop" "109"
        WriteRegStr   HKCU "Software\EasyBoot Systems\EasyBoot\3.0" "KeepKernel" "1"
        WriteRegStr   HKCU "Software\EasyBoot Systems\EasyBoot\3.0" "CDFileDir" "$INSTDIR\disk1"
        WriteRegStr   HKCU "Software\EasyBoot Systems\EasyBoot\3.0" "MenuFileName" "cdmenu.ezb"
        WriteRegStr   HKCU "Software\EasyBoot Systems\EasyBoot\3.0" "ISOFileDir" "$INSTDIR\iso"
        WriteRegStr   HKCU "Software\EasyBoot Systems\EasyBoot\3.0" "ISOFileName" "mycd.iso"
        WriteRegStr   HKCU "Software\EasyBoot Systems\EasyBoot\3.0" "Optimize" "0"
        WriteRegStr   HKCU "Software\EasyBoot Systems\EasyBoot\3.0" "VOL_DOS83" "0"
        WriteRegStr   HKCU "Software\EasyBoot Systems\EasyBoot\3.0" "VOL_Joliet" "0"
        WriteRegStr   HKCU "Software\EasyBoot Systems\EasyBoot\3.0" "SetDateTime" "0"
        WriteRegStr   HKCU "Software\EasyBoot Systems\EasyBoot\3.0" "HideBootFolder" "1"
        WriteRegStr   HKCU "Software\EasyBoot Systems\EasyBoot\3.0" "HideBootFiles" "1"
        WriteRegStr   HKCU "Software\EasyBoot Systems\EasyBoot\3.0" "DVDDisc" "0"
  WriteRegStr   HKLM "SOFTWARE\EasyBoot Systems\EasyBoot\3.0" "" "$INSTDIR"

; 创建开始菜单快捷方式
  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
  CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\EasyBoot.lnk" "$INSTDIR\EasyBoot.exe"
  CreateShortCut "$DESKTOP\EasyBoot.lnk" "$INSTDIR\EasyBoot.exe"
  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\NeroBurn.lnk" "$INSTDIR\NeroBurn.exe"
  !insertmacro MUI_STARTMENU_WRITE_END
SectionEnd


Section "注册机Keygen" SEC02
  SectionIn 2
  SetOutPath "$INSTDIR"
  File "EasyBoot\Keygen.exe"
; 创建开始菜单快捷方式
  CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Keygen.lnk" "$INSTDIR\Keygen.exe"
  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
  !insertmacro MUI_STARTMENU_WRITE_END
SectionEnd

Section "EasyBoot 简介" SEC15
  SectionIn 1 2
  SetOutPath "$INSTDIR"
  File "EasyBoot\Readme.txt"
; 创建开始菜单快捷方式
  CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\EasyBoot 简介.lnk" "$INSTDIR\Readme.txt"
  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
  !insertmacro MUI_STARTMENU_WRITE_END
SectionEnd

Section "EasyBoot 更新历史" SEC16
SectionIn  2
  SetOutPath "$INSTDIR"
  File "EasyBoot\History.txt"
; 创建开始菜单快捷方式
  CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\EasyBoot 更新历史.lnk" "$INSTDIR\History.txt"
  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
  !insertmacro MUI_STARTMENU_WRITE_END
SectionEnd

Section "EasyBoot chm帮助" SEC17
  SectionIn 1 2
  SetOutPath "$INSTDIR"
  File "EasyBoot\EasyBoot.chm"
; 创建开始菜单快捷方式
  CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\EasyBoot chm帮助.lnk" "$INSTDIR\EasyBoot.chm"
  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
  !insertmacro MUI_STARTMENU_WRITE_END
SectionEnd


Section "EasyBoot 许可协议" SEC19
SectionIn 2 
  SetOutPath "$INSTDIR"
  File "EasyBoot\License.txt"
; 创建开始菜单快捷方式
  CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\EasyBoot 许可协议.lnk" "$INSTDIR\License.txt"
  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
  !insertmacro MUI_STARTMENU_WRITE_END
SectionEnd


SectionGroupEnd

SectionGroup /e "Create MultiBoot Folders And Files"  SEC03

Section "启动软盘组脚本帮助" SEC04
  SectionIn 1 2 
  SetOutPath "$INSTDIR\CMBFAF"
  File "CMBFAF\制作Windowsn合1的利器—微软NT-OS的启动软盘组脚本.mht"

; 创建开始菜单快捷方式
  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
  CreateDirectory "$SMPROGRAMS\$ICONS_GROUP\CMBFAF"
  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\CMBFAF\制作Windowsn合1的利器—微软NT-OS的启动软盘组脚本.lnk" "$INSTDIR\CMBFAF\制作Windowsn合1的利器—微软NT-OS的启动软盘组脚本.mht"
  
  !insertmacro MUI_STARTMENU_WRITE_END
SectionEnd

Section "readme" SEC05
  SectionIn 1 2 
  SetOutPath "$INSTDIR\CMBFAF"
  File "CMBFAF\readme.txt"
  
; 创建开始菜单快捷方式
  CreateDirectory "$SMPROGRAMS\$ICONS_GROUP\CMBFAF"
  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\CMBFAF\readme.lnk" "$INSTDIR\CMBFAF\readme.txt"
  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
  !insertmacro MUI_STARTMENU_WRITE_END
SectionEnd

Section "原版" SEC06
  SectionIn 1 2 
  SetOutPath "$INSTDIR\CMBFAF"
  SetOutPath "$INSTDIR\CMBFAF\Create_MultiBoot_Folders_And_Files"
  File "CMBFAF\Create_MultiBoot_Folders_And_Files\BOOT.BIN"
  File "CMBFAF\Create_MultiBoot_Folders_And_Files\create_boot_folder.cmd"
  File "CMBFAF\Create_MultiBoot_Folders_And_Files\create_boot_folders.cmd"
  File "CMBFAF\Create_MultiBoot_Folders_And_Files\replaceAMD64.xsc"
  File "CMBFAF\Create_MultiBoot_Folders_And_Files\replaceI386.xsc"
  File "CMBFAF\Create_MultiBoot_Folders_And_Files\sed.exe"
  File "CMBFAF\Create_MultiBoot_Folders_And_Files\SETUPLDR.BIN"
  File "CMBFAF\Create_MultiBoot_Folders_And_Files\universalrepl.xsc"
  File "CMBFAF\Create_MultiBoot_Folders_And_Files\unix2dos.exe"
  File "CMBFAF\Create_MultiBoot_Folders_And_Files\XVI32.exe"
  File "CMBFAF\Create_MultiBoot_Folders_And_Files\XVI32.ini"
  File "CMBFAF\Create_MultiBoot_Folders_And_Files\setupldrcheck.xsc"

; 创建开始菜单快捷方式
  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
  CreateDirectory "$SMPROGRAMS\$ICONS_GROUP\CMBFAF"
  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\CMBFAF\create_boot_folders.lnk" "$INSTDIR\CMBFAF\Create_MultiBoot_Folders_And_Files\create_boot_folders.cmd"

  !insertmacro MUI_STARTMENU_WRITE_END
SectionEnd

Section "GUI界面" SEC07
  SectionIn 2 
  SetOutPath "$INSTDIR\CMBFAF"
  SetOutPath "$INSTDIR\CMBFAF\Create_MultiBoot_Folders_And_Files"
  File "CMBFAF\Create_MultiBoot_Folders_And_Files\boot.exe"

; 创建开始菜单快捷方式
  CreateDirectory "$SMPROGRAMS\$ICONS_GROUP\CMBFAF"
  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\CMBFAF\GUI版.lnk" "$INSTDIR\CMBFAF\Create_MultiBoot_Folders_And_Files\boot.exe"
  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
  !insertmacro MUI_STARTMENU_WRITE_END
SectionEnd

Section "修改版1" SEC08
  SectionIn 1 2 
  SetOutPath "$INSTDIR\CMBFAF"
  SetOutPath "$INSTDIR\CMBFAF\Create_MultiBoot_Folders_And_Files"
  File "CMBFAF\Create_MultiBoot_Folders_And_Files\CBF.cmd"
  File "CMBFAF\Create_MultiBoot_Folders_And_Files\example.cmd"

; 创建开始菜单快捷方式
  CreateDirectory "$SMPROGRAMS\$ICONS_GROUP\CMBFAF"
  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\CMBFAF\修改版.lnk" "$INSTDIR\CMBFAF\Create_MultiBoot_Folders_And_Files\example.cmd"
  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
  !insertmacro MUI_STARTMENU_WRITE_END
SectionEnd

Section "修改版2" SEC09
  SectionIn 1 2 
  SetOutPath "$INSTDIR\CMBFAF"
  SetOutPath "$INSTDIR\CMBFAF\Create_MultiBoot_Folders_And_Files"
  File "CMBFAF\Create_MultiBoot_Folders_And_Files\yxn.cmd"
  File "CMBFAF\Create_MultiBoot_Folders_And_Files\yxn_create_boot_folder.cmd"

; 创建开始菜单快捷方式
  CreateDirectory "$SMPROGRAMS\$ICONS_GROUP\CMBFAF"
  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\CMBFAF\yxn.lnk" "$INSTDIR\CMBFAF\Create_MultiBoot_Folders_And_Files\yxn.cmd"

  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
  !insertmacro MUI_STARTMENU_WRITE_END
SectionEnd
SectionGroupEnd


SectionGroup /e "CDIMAGE" SEC10

Section "CDIMAGE2.47" SEC11
  SectionIn 1 2 
  SetOutPath "$INSTDIR\cdimage"
  File "cdimage\cdimage.exe"

; 创建开始菜单快捷方式
  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
  CreateDirectory "$SMPROGRAMS\$ICONS_GROUP\CDIMAGE"
  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\CDIMAGE\cdimage.lnk" "$INSTDIR\cdimage\cdimage.exe"

  !insertmacro MUI_STARTMENU_WRITE_END
SectionEnd

Section "cdimageGUI" SEC12
SectionIn 1 2 
  SetOutPath "$INSTDIR\cdimage"
  File "cdimage\cdimagegui.exe"
  File "cdimage\cdimagegui.INI"

; 创建开始菜单快捷方式
  CreateDirectory "$SMPROGRAMS\$ICONS_GROUP\CDIMAGE"
  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\CDIMAGE\cdimagegui.lnk" "$INSTDIR\cdimage\cdimagegui.exe"
  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
  !insertmacro MUI_STARTMENU_WRITE_END
SectionEnd

Section "CDIMAGE2.47用法翻译" SEC13
SectionIn 1 2 
  SetOutPath "$INSTDIR\cdimage"
  File "cdimage\CDIMAGE2.47用法翻译大全.txt"

; 创建开始菜单快捷方式
CreateDirectory "$SMPROGRAMS\$ICONS_GROUP\CDIMAGE"
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\CDIMAGE\CDIMAGE2.47用法翻译.lnk" "$INSTDIR\cdimage\CDIMAGE2.47用法翻译大全.txt"
  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
  !insertmacro MUI_STARTMENU_WRITE_END
SectionEnd
SectionGroupEnd
Section -AdditionalIcons
  SetOutPath $INSTDIR
  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\卸载.lnk" "$INSTDIR\uninst.exe"
  !insertmacro MUI_STARTMENU_WRITE_END
SectionEnd

Section -Post
  WriteUninstaller "$INSTDIR\uninst.exe"
  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\EasyBoot.exe"
  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\EasyBoot.exe"
  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

#-- 根据 NSIS 脚本编辑规则,所有 Function 区段必须放置在 Section 区段之后编写,以避免安装程序出现未可预知的问题。--#
;组件关联选项
Function .onSelChange
SectionGetFlags ${sec07} $1
StrCmp $1 1 0 +2
SectionSetFlags ${sec06} 1

SectionGetFlags ${sec08} $2
StrCmp $2 1 0 +2
SectionSetFlags ${sec06} 1

SectionGetFlags ${sec09} $3
StrCmp $3 1 0 +2
SectionSetFlags ${sec06} 1
FunctionEnd


; 区段组件描述
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN

  !insertmacro MUI_DESCRIPTION_TEXT ${SEC14} "EasyBoot"
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "EasyBoot 5.1.2.586主程序(必选)" 
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC15} "EasyBoot 简介&&注册用户名更改使用及其他说明"
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC16} "EasyBoot 更新历史"
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC17} "EasyBoot chm帮助"
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC19} "EasyBoot 许可协议"
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC02} "默认已经注册为Nonenever,如果想注册为个人信息就选择安装此项,EasyBoot 简介 中有说明"
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} "制作Windowsn合1的利器—微软NT-OS的启动软盘组脚本"
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} "制作Windowsn合1的利器—微软NT-OS的启动软盘组脚本.mht"
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC05}  "各个Create_MultiBoot_Folders_And_Files说明"
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC06} "Create_MultiBoot_Folders_And_Files原版"
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC07} "Create_MultiBoot_Folders_And_Files的GUI界面"
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC08} "Create_MultiBoot_Folders_And_Files的一个修改版"
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC09} "Create_MultiBoot_Folders_And_Files意先念修改版(增加复制winnt.sif到安装调用文件夹)"
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC10} "cdimage相同文件优化利器"
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC11} "cdimage 2.47"
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC12} "cdimage 2.47 GUI版"
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC13} "CDIMAGE2.47用法翻译"

!insertmacro MUI_FUNCTION_DESCRIPTION_END

/******************************
*  以下是安装程序的卸载部分  *
******************************/

Section Uninstall
  !insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP
  Delete "$INSTDIR\uninst.exe"
  Delete "$INSTDIR\cdimage\CDIMAGE2.47用法翻译大全.txt"
  Delete "$INSTDIR\cdimage\cdimagegui.INI"
  Delete "$INSTDIR\cdimage\cdimagegui.exe"
  Delete "$INSTDIR\cdimage\cdimage.exe"
  Delete "$INSTDIR\CMBFAF\Create_MultiBoot_Folders_And_Files\yxn_create_boot_folder.cmd"
  Delete "$INSTDIR\CMBFAF\Create_MultiBoot_Folders_And_Files\yxn.cmd"
  Delete "$INSTDIR\CMBFAF\Create_MultiBoot_Folders_And_Files\example.cmd"
  Delete "$INSTDIR\CMBFAF\Create_MultiBoot_Folders_And_Files\CBF.cmd"
  Delete "$INSTDIR\CMBFAF\Create_MultiBoot_Folders_And_Files\boot.exe"
  Delete "$INSTDIR\CMBFAF\Create_MultiBoot_Folders_And_Files\setupldrcheck.xsc"
  Delete "$INSTDIR\CMBFAF\Create_MultiBoot_Folders_And_Files\XVI32.ini"
  Delete "$INSTDIR\CMBFAF\Create_MultiBoot_Folders_And_Files\XVI32.exe"
  Delete "$INSTDIR\CMBFAF\Create_MultiBoot_Folders_And_Files\unix2dos.exe"
  Delete "$INSTDIR\CMBFAF\Create_MultiBoot_Folders_And_Files\universalrepl.xsc"
  Delete "$INSTDIR\CMBFAF\Create_MultiBoot_Folders_And_Files\SETUPLDR.BIN"
  Delete "$INSTDIR\CMBFAF\Create_MultiBoot_Folders_And_Files\sed.exe"
  Delete "$INSTDIR\CMBFAF\Create_MultiBoot_Folders_And_Files\replaceI386.xsc"
  Delete "$INSTDIR\CMBFAF\Create_MultiBoot_Folders_And_Files\replaceAMD64.xsc"
  Delete "$INSTDIR\CMBFAF\Create_MultiBoot_Folders_And_Files\create_boot_folders.cmd"
  Delete "$INSTDIR\CMBFAF\Create_MultiBoot_Folders_And_Files\create_boot_folder.cmd"
  Delete "$INSTDIR\CMBFAF\Create_MultiBoot_Folders_And_Files\BOOT.BIN"
  Delete "$INSTDIR\CMBFAF\readme.txt"
  Delete "$INSTDIR\CMBFAF\制作Windowsn合1的利器—微软NT-OS的启动软盘组脚本.mht"
  Delete "$INSTDIR\Keygen.exe"
  Delete "$INSTDIR\resource\wxp.bat"
  Delete "$INSTDIR\resource\w2k.bat"
  Delete "$INSTDIR\resource\w2003.bat"
  Delete "$INSTDIR\resource\useflp.com"
  Delete "$INSTDIR\resource\useemu.com"
  Delete "$INSTDIR\resource\restart.com"
  Delete "$INSTDIR\resource\reboot.com"
  Delete "$INSTDIR\resource\off.com"
  Delete "$INSTDIR\resource\ezboot.com"
  Delete "$INSTDIR\resource\cdmenu.bat"
  Delete "$INSTDIR\resource\bootfix.bin"
  Delete "$INSTDIR\Readme.txt"
  Delete "$INSTDIR\NeroBurn.exe"
  Delete "$INSTDIR\License.txt"
  Delete "$INSTDIR\History.txt"
  Delete "$INSTDIR\ezboot.ico"
  Delete "$INSTDIR\ezboot.dat"
  Delete "$INSTDIR\EasyBoot.exe"
  Delete "$INSTDIR\EasyBoot.chm"
  Delete "$INSTDIR\disk1\ezboot\w2ksect.bin"
  Delete "$INSTDIR\disk1\ezboot\vistaldr.bin"
  Delete "$INSTDIR\disk1\ezboot\standard.ctb"
  Delete "$INSTDIR\disk1\ezboot\setup98.img"
  Delete "$INSTDIR\disk1\ezboot\msldr.bin"
  Delete "$INSTDIR\disk1\ezboot\memdisk"
  Delete "$INSTDIR\disk1\ezboot\logo.bmp"
  Delete "$INSTDIR\disk1\ezboot\logo.bm1"
  Delete "$INSTDIR\disk1\ezboot\loader.bin"
  Delete "$INSTDIR\disk1\ezboot\isolinux"
  Delete "$INSTDIR\disk1\ezboot\eblogo.bmp"
  Delete "$INSTDIR\disk1\ezboot\ebback.bmp"
  Delete "$INSTDIR\disk1\ezboot\default.ezb"
  Delete "$INSTDIR\disk1\ezboot\cdmenu.ezb"
  Delete "$INSTDIR\disk1\ezboot\bcdw.txt"
  Delete "$INSTDIR\disk1\ezboot\bcdw.bin"
  Delete "$INSTDIR\disk1\ezboot\BACK.BMP"
  Delete "$INSTDIR\disk1\ezboot\back.bm1"

  Delete "$SMPROGRAMS\$ICONS_GROUP\卸载.lnk"
  Delete "$SMPROGRAMS\$ICONS_GROUP\CDIMAGE\cdimagegui.lnk"
  Delete "$SMPROGRAMS\$ICONS_GROUP\CDIMAGE\cdimage.lnk"
  Delete "$SMPROGRAMS\$ICONS_GROUP\CDIMAGE\CDIMAGE2.47用法翻译.lnk"
  Delete "$SMPROGRAMS\$ICONS_GROUP\CMBFAF\修改版.lnk"
  Delete "$SMPROGRAMS\$ICONS_GROUP\CMBFAF\GUI版.lnk"
  Delete "$SMPROGRAMS\$ICONS_GROUP\CMBFAF\create_boot_folders.lnk"
  Delete "$SMPROGRAMS\$ICONS_GROUP\CMBFAF\yxn.lnk"
  Delete "$SMPROGRAMS\$ICONS_GROUP\CMBFAF\readme.lnk"
  Delete "$SMPROGRAMS\$ICONS_GROUP\CMBFAF\制作Windowsn合1的利器—微软NT-OS的启动软盘组脚本.lnk"
  Delete "$SMPROGRAMS\$ICONS_GROUP\Keygen.lnk"
  Delete "$SMPROGRAMS\$ICONS_GROUP\EasyBoot 简介.lnk"
  Delete "$SMPROGRAMS\$ICONS_GROUP\NeroBurn.lnk"
  Delete "$SMPROGRAMS\$ICONS_GROUP\EasyBoot 许可协议.lnk"
  Delete "$SMPROGRAMS\$ICONS_GROUP\EasyBoot 更新历史.lnk"
  Delete "$SMPROGRAMS\$ICONS_GROUP\EasyBoot chm帮助.lnk"
  Delete "$DESKTOP\EasyBoot.lnk"
  Delete "$SMPROGRAMS\$ICONS_GROUP\EasyBoot.lnk"
  
  DeleteRegKey  HKCR ".ezb"
  DeleteRegKey  HKCR "EasyBoot"
  DeleteRegKey  HKCU "Software\EasyBoot Systems\EasyBoot"
  DeleteRegKey  HKLM "SOFTWARE\EasyBoot Systems\EasyBoot"


  RMDir "$SMPROGRAMS\$ICONS_GROUP\CMBFAF"
  RMDir "$SMPROGRAMS\$ICONS_GROUP\CDIMAGE"
  RMDir "$SMPROGRAMS\$ICONS_GROUP"
  RMDir "$INSTDIR\resource"
  RMDir "$INSTDIR\disk1\ezboot"
  RMDir "$INSTDIR\disk1"
  RMDir "$INSTDIR\CMBFAF\Create_MultiBoot_Folders_And_Files"
  RMDir "$INSTDIR\CMBFAF"
  RMDir "$INSTDIR\cdimage"
  RMDir "$INSTDIR"

  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
  DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
  SetAutoClose true
SectionEnd

#-- 根据 NSIS 脚本编辑规则,所有 Function 区段必须放置在 Section 区段之后编写,以避免安装程序出现未可预知的问题。--#

Function un.onInit
  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "你确实要完全移除 $(^Name) ,及其所有的组件?" IDYES +2
  Abort
FunctionEnd

Function un.onUninstSuccess
  HideWindow
  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) 已成功地从你的计算机移除。"
FunctionEnd