脚本:迅雷5.9.1.922

优质
小牛编辑
115浏览
2023-12-01
引用脚本的内容:

!define PRODUCT_NAME "迅雷"
!define THIS_NAME_LITE "迅雷5"
!define VER_MAJOR "5.9"
!define VER_MINOR "1.922"
!define PRODUCT_VERSION "5.9.1.922"
;!define PRODUCT_PUBLISHER "xuexi"
!define InstroFile "Readme.txt"
!define PRODUCT_PUBLISHER "迅雷网络技术有限公司"
!define PRODUCT_WEB_SITE "http://www.xunlei.com"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Thunder.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"
SetCompressor lzma
InstType "完全安装"
InstType "推荐安装"
!AddPluginDir ".\"
!AddIncludeDir ".\"
ReserveFile          "${NSISDIR}\Plugins\System.dll"
ReserveFile          "AnimGif.dll"
ReserveFile          "Left.bmp"
ReserveFile          "1.gif"
ReserveFile          "Header.bmp"
ReserveFile          "3.gif"
ReserveFile          "ButtonEvent.dll"
ReserveFile          "ButtonLinker.dll"
ReserveFile          "linker.dll"
!include "MUI.nsh"
!include "ButtonLinkerLib.nsh"
!define MUI_CUSTOMFUNCTION_GUIINIT MyGUIInit
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_RIGHT
!define MUI_HEADERIMAGE_BITMAP "Header.bmp"
!define MUI_WELCOMEFINISHPAGE_BITMAP "emptyw.bmp"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "Left.bmp"
!define MUI_WELCOMEPAGE_TITLE "欢迎安装和使用 迅雷V5.9.1 特别版"
!define MUI_ICON "Thunder.ico"
!define MUI_UNICON "unThunder.ico"
!define MUI_PAGE_CUSTOMFUNCTION_PRE pre
!define MUI_PAGE_CUSTOMFUNCTION_SHOW show
!insertmacro MUI_PAGE_WELCOME
!define MUI_LICENSEPAGE_CHECKBOX
LicenseBkColor "D2FBB5"
LicenseText "软件许可协议" "我接受"
!insertmacro MUI_PAGE_LICENSE "License.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!define MUI_PAGE_CUSTOMFUNCTION_PRE pre
!define MUI_PAGE_CUSTOMFUNCTION_SHOW show
!define MUI_FINISHPAGE_RUN "$INSTDIR\Program\Thunder.exe"
!define MUI_FINISHPAGE_SHOWREADME_TEXT "查看更新历史"
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\Program\Whatsnew.txt"
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH
!insertmacro MUI_LANGUAGE "SimpChinese"
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
VIProductVersion "5.9.1.922"
VIAddVersionKey /LANG=2052 "FileVersion" "5"
VIAddVersionKey /LANG=2052 "ProductVersion" "5.9.1.922"
VIAddVersionKey /LANG=2052 "ProductName" "迅雷5特别版"
VIAddVersionKey /LANG=2052 "Comments" "Thunder v5.9.1$\r$\n(http://www.xunlei.com/)"
VIAddVersionKey /LANG=2052 "LegalCopyright" "Copyleft (C) 梦想吧xuexi"
VIAddVersionKey /LANG=2052 "FileDescription" "xunlei Setup Program"
VIAddVersionKey /LANG=2052 "SpecialBuild" "Thunder_v5.9.1 Setup, built on 2009 06 10"
!ifndef IDC_BUTTON
!define IDC_BUTTON    1190
!endif
!ifndef IDC_LINKER
!define IDC_LINKER    1200
!endif
!ifndef IDM_ABOUT1
!define IDM_ABOUT1    1300
!endif
!macro MYMACRO un
Function ${un}AboutButton
MessageBox MB_OK|MB_ICONINFORMATION "迅雷V5.9.1 特别版。梦想吧xuexi 特别制作!"
FunctionEnd
Function ${un}AboutMenu1
  MessageBox MB_OK|MB_ICONINFORMATION "    迅雷使用的多资源超线程技术基于网格原理,能够将网络上存在的服务器  $\r$\n和计算机资源进行有效的整合,构成独特的迅雷网络,通过迅雷网络各种数据  $\r$\n文件能够以最快速度进行传递。多资源超线程技术还具有互联网下载负载均衡  $\r$\n功能,在不降低用户体验的前提下,迅雷网络可以对服务器资源进行均衡,有$\r$\n效降低了服务器负载。"
FunctionEnd
Function ${un}MyGUIInit
InitPluginsDir
Pop $0
Pop $1
Pop $2
Pop $3
    ${GetDlgItemRect} $0 $1 $2 $3 $HWNDPARENT ${IDC_CANCEL}
IntOp $2 $3 - $1
${CreateButton2} "关于(A)" 20 $1 80 $2 $HWNDPARENT ${IDC_BUTTON} ${un}AboutButton
    ${GetDlgItemRect} $0 $1 $2 $3 $HWNDPARENT ${IDC_CANCEL}
IntOp $2 $3 - $1
IntOp $1 $1 + 4
IntOp $2 $2 - 1
${CreateLinker2} "迅雷软件中心" 120 $1 80 $2 $HWNDPARENT ${IDC_LINKER} "http://dl.xunlei.com/"
${CreateMenu2} 0 ${MF_SEPARATOR} $HWNDPARENT 0 ${un}MyGUIInit
${CreateMenu2} "关于迅雷5(A)" ${MF_STRING} $HWNDPARENT ${IDM_ABOUT1} ${un}AboutMenu1
FunctionEnd
!macroend
!insertmacro MYMACRO ""
!insertmacro MYMACRO "un."
!insertmacro MYMACRO "un"
Name "迅雷5.9.1.922"
OutFile "Thunder5.exe"
Caption "安装 迅雷5"
InstallDir "$PROGRAMFILES\Thunder Network\Thunder"
InstallDirRegKey HKLM "${PRODUCT_UNINST_KEY}" "UninstallString"
ShowInstDetails nevershow
ShowUnInstDetails hide
BrandingText "Www.xunlei.Com"
!define COLOR_WINDOW 5
!define COLOR_BTNFACE 15
Function pre
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 1" "Text" ""
Functionend
Function show
  AnimGif::play /NOUNLOAD /HALIGN=LEFT /VALIGN=CENTER /BGCOL=${COLOR_WINDOW} "$PLUGINSDIR\1.gif"
FunctionEnd
Function .onGUIEnd
  AnimGif::stop
FunctionEnd
Section
  SetDetailsPrint textonly
  DetailPrint "正在准备安装文件..."
  SetDetailsPrint listonly
  AnimGif::play /NOUNLOAD "$PLUGINSDIR\3.gif"
  Sleep 1000
  Sleep 1000
SectionEnd
Section "-clean"
  DeleteRegKey   HKCU  "Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载"
  DeleteRegKey   HKCU  "Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载全部链接"
SectionEnd
SectionGroup /e  "迅雷V5.9.1 特别版" secxl
Section "主程序【必选】" sec01
  SetDetailsPrint textonly
  DetailPrint "正在安装程序的基本组件..."
  SetDetailsPrint listonly
  SectionIn 1 2 RO
  SetOverwrite ifnewer
  SetOutPath "$SYSDIR"
  File /r "SYSDIR\*.*"
  RegDLL "$SYSDIR\atl71.dll"
  RegDLL "$SYSDIR\msvcirt.dll"
  RegDLL "$SYSDIR\MFC71u.dll"
  RegDLL "$SYSDIR\msvcp71.dll"
  RegDLL "$SYSDIR\msvcr71.dll"
  Sleep 3000
  SetOverwrite try
  SetOutPath "$INSTDIR"
  File /r "app\*.*"
  RegDLL "$INSTDIR\Program\mp.dll"
  RegDLL "$INSTDIR\Program\stream.dll"
  Sleep 1000
  SetDetailsPrint textonly
  DetailPrint "正在添加注册表信息..."
  SetDetailsPrint none
WriteRegStr HKLM "SOFTWARE\Thunder Network\ThunderOem\thunder_backwnd" "Path" "$INSTDIR\Program\Thunder.exe"
WriteRegStr HKLM "SOFTWARE\Thunder Network\ThunderOem\thunder_backwnd" "Version" "5.9.1.922"
WriteRegStr HKCR "thunderim" "" "ThunderIM Protocol"
WriteRegStr HKCR "thunderim" "URL Protocol" ""
WriteRegStr HKCR "thunderim\shell\open\command" "" "$\"$INSTDIR\Program\Thunder.exe$\" /ThunderIM:$\"%1$\""
  Sleep 1000
SectionEnd
Sectiongroupend
SectionGroup /e  "创建快捷方式" seckj
Section "桌面快捷方式" SecDesktop
  SectionIn 1 2
  SetDetailsPrint textonly
  DetailPrint "正在创建快捷方式..."
  SetDetailsPrint listonly
  CreateShortCut "$DESKTOP\迅雷5.lnk" "$INSTDIR\Program\Thunder.exe" "" "" "" "" "CTRL|F9" "使用多资源超线程技术的下载工具"
SectionEnd
Section "开始菜单快捷方式" SecStartmenu
  SectionIn 1 2
  SetDetailsPrint textonly
  DetailPrint "正在创建快捷方式..."
  SetDetailsPrint listonly
  CreateDirectory "$SMPROGRAMS\迅雷软件\迅雷5"
  CreateShortCut "$SMPROGRAMS\迅雷软件\迅雷5\启动迅雷5.lnk" "$INSTDIR\Program\Thunder.exe"
  CreateShortCut "$SMPROGRAMS\迅雷软件\迅雷5\更新信息.lnk" "$INSTDIR\Program\Whatsnew.txt"
  CreateShortCut "$SMPROGRAMS\迅雷软件\迅雷5\卸载迅雷5.lnk" "$INSTDIR\uninst.exe"
SectionEnd
Section "快速启动栏快捷方式" SecQuick
  SectionIn 1
  SetDetailsPrint textonly
  DetailPrint "正在创建快捷方式..."
  SetDetailsPrint listonly
  CreateShortCut "$QUICKLAUNCH\启动迅雷5.lnk" "$INSTDIR\Program\Thunder.exe"
SectionEnd
Sectiongroupend

SectionGroup /e  "浏览器支持【推荐】" secllq
Section "IE浏览器支持" sec02
  SectionIn 1 2
  SetOverwrite on
  SetDetailsPrint textonly
  DetailPrint "正在添加IE浏览器支持..."
  SetDetailsPrint listonly
  SetOutPath "$INSTDIR"
  File /r "gnzq\*.*"
  RegDLL "$INSTDIR\ComDlls\ThunderAgent.dll"
  RegDLL "$INSTDIR\ComDlls\XunLeiBHO.dll"
  RegDLL "$INSTDIR\ComDlls\TdAtOnce.dll"
  Sleep 2000
WriteRegStr HKCU "Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载" "" "$INSTDIR\Program\GetUrl.htm"
WriteRegDWORD HKCU "Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载" "Contexts" 0x00000022
WriteRegStr HKCU "Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载全部链接" "" "$INSTDIR\Program\GetAllUrl.htm"
WriteRegDWORD HKCU "Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载全部链接" "Contexts" 0x000000f3
WriteRegStr HKLM "SOFTWARE\Microsoft\Internet Explorer\Extensions\{09BA8F6D-CB54-424B-839C-C2A6C8E6B436}" "ButtonText" "启动迅雷5"
WriteRegStr HKLM "SOFTWARE\Microsoft\Internet Explorer\Extensions\{09BA8F6D-CB54-424B-839C-C2A6C8E6B436}" "Exec" "$INSTDIR\Program\Thunder.exe"
WriteRegStr HKLM "SOFTWARE\Microsoft\Internet Explorer\Extensions\{09BA8F6D-CB54-424B-839C-C2A6C8E6B436}" "Icon" "$INSTDIR\Program\Thunder.ico"
WriteRegStr HKLM "SOFTWARE\Microsoft\Internet Explorer\Extensions\{09BA8F6D-CB54-424B-839C-C2A6C8E6B436}" "HotIcon" "$INSTDIR\Program\Thunder.ico"
WriteRegStr HKLM "SOFTWARE\Microsoft\Internet Explorer\Extensions\{09BA8F6D-CB54-424B-839C-C2A6C8E6B436}" "MenuStatusBar" "启动迅雷5"
WriteRegStr HKLM "SOFTWARE\Microsoft\Internet Explorer\Extensions\{09BA8F6D-CB54-424B-839C-C2A6C8E6B436}" "MenuText" "启动迅雷5"
WriteRegStr HKLM "SOFTWARE\Microsoft\Internet Explorer\Extensions\{09BA8F6D-CB54-424B-839C-C2A6C8E6B436}" "CLSID" "{1FBA04EE-3024-11D2-8F1F-0000F87ABD16}"
WriteRegStr HKLM "SOFTWARE\Microsoft\Internet Explorer\Extensions\{09BA8F6D-CB54-424B-839C-C2A6C8E6B436}" "Default Visible" "Yes"
SectionEnd
Section "BT文件关联" sec03
  SectionIn 1 2
  
  WriteRegStr HKCR ".torrent" "" "bittorrent"
WriteRegStr HKCR "bittorrent" "" ""
WriteRegStr HKCR "bittorrent\DefaultIcon" "" "$\"$INSTDIR\Program\Thunder5.exe$\",16"
WriteRegStr HKCR "bittorrent\shell\open\command" "" "$\"$INSTDIR\Program\Thunder.exe$\" /openfile $\"%1$\""
SectionEnd
Section "Firefox支持" sec04
  SectionIn 1 2
  SetDetailsPrint textonly
  DetailPrint "正在添加Firefox支持..."
  SetDetailsPrint listonly
  ReadRegStr $R0 HKLM "SOFTWARE\Mozilla\Mozilla Firefox\3.0.8 (zh-CN)\Main" "Install Directory"
  IfFileExists "$R0\firefox.exe" 0 next
  SetOutPath "$TEMP"
  File ".\Thunder.xpi"
  Exec '"$R0\firefox.exe" $TEMP\Thunder.xpi'
  next:
SectionEnd
Section "Opera9.4中国版支持" sec05
  SectionIn 1 2
  SetDetailsPrint textonly
  DetailPrint "正在添加Opera9.4中国版支持..."
  SetDetailsPrint listonly
  ReadRegStr $R0 HKCU "Software\Opera Software" "Last Directory3"
  IfFileExists "$R0\opera.exe" 0 send
  Rename "$APPDATA\Opera\Opera\profile\menu\menu_thunder.ini" "$APPDATA\Opera\Opera\profile\menu\menu_thunder.bak"
  Delete "$APPDATA\Opera\Opera\profile\menu\menu_thunder.ini"
  SetOutPath "$INSTDIR\Components\ExplorerHelper"
  File "opera\XLNonIESvr.exe"
  SetOutPath "$R0"
  File /r "opera\JS\*.*"
  SetOutPath "$APPDATA\Opera\Opera\profile\menu"
  SetOverwrite on
;  DeleteINISec $APPDATA\Opera\Opera\profile\menu\menu_thunder.ini "Link Popup Menu"
;  DeleteINIStr "$APPDATA\Opera\Opera\profile\menu\menu_thunder.ini" "Link Popup Menu" 'Item,"使用迅雷下载"'
  File "opera\menu\menu_thunder.ini"
StrCpy $0 "$APPDATA\Opera\Opera\profile\menu\menu_thunder.ini"
StrCpy $1 "$APPDATA\Opera\Opera\profile\menu\menu_thunder.ini"
StrCpy $2 AUTO
unicode::FileUnicode2Ansi "$0" "$1" $2
Pop $3
  WriteINIStr "$APPDATA\Opera\Opera\profile\menu\menu_thunder.ini" "Info" "NAME" "迅雷下载"
  WriteINIStr "$APPDATA\Opera\Opera\profile\menu\menu_thunder.ini" "Link Popup Menu" 'Item,"使用迅雷下载"' 'Execute Program, "$INSTDIR\Components\ExplorerHelper\XLNonIESvr.exe", "@%l %u"'
  WriteINIStr "$APPDATA\Opera\Opera\profile\menu\menu_thunder.ini" "Document Popup Menu" "Item, MI_IDM_FULLSCREENTOGGLE" "Enter fullscreen | Leave fullscreen"
  WriteINIStr "$APPDATA\Opera\Opera\profile\menu\menu_thunder.ini" "Document Popup Menu" 'Item,"使用迅雷下载全部链接"' 'Execute Program, "$INSTDIR\Components\ExplorerHelper\XLNonIESvr.exe", "#%s %u"'
  WriteINIStr "$APPDATA\Opera\Opera\profile\menu\menu_thunder.ini" "Image Link Popup Menu" "Item, MI_IDM_SHOW_FIGURE_PROPERTIES" "Show image properties"
  WriteINIStr "$APPDATA\Opera\Opera\profile\menu\menu_thunder.ini" "Image Link Popup Menu" 'Item,"使用迅雷下载"' 'Copy image address Execute Program, "$INSTDIR\Components\ExplorerHelper\XLNonIESvr.exe", "@%c %u"'
StrCpy $0 "$APPDATA\Opera\Opera\profile\menu\menu_thunder.ini"
StrCpy $1 "$APPDATA\Opera\Opera\profile\menu\menu_thunder.ini"
StrCpy $2 UTF-8
unicode::FileAnsi2Unicode "$0" "$1" $2
Pop $3
StrCpy $0 "$APPDATA\Opera\Opera\profile\opera6.ini"
StrCpy $1 "$APPDATA\Opera\Opera\profile\opera6.ini"
StrCpy $2 AUTO
unicode::FileUnicode2Ansi "$0" "$1" $2
Pop $3
  WriteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "User Prefs" "Error Console Filter" "javascript=4,mail=3"
  WriteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "User Prefs" "User JavaScript File" "$R0\User JS"
  WriteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "User Prefs" "User JavaScript" "1"
  WriteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "User Prefs" "Always Load User JavaScript" "1"
  WriteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "User Prefs" "Toolbar Configuration" "$R0\defaults\standard_toolbar.ini"
  WriteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "User Prefs" "Menu Configuration" "$APPDATA\Opera\Opera\profile\menu\menu_thunder.ini"
  WriteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "User Prefs" "Source Viewer" '""""'
  WriteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "User Prefs" "Source Viewer Mode" "3"
  WriteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "Saved Settings" "Open Dir" "$INSTDIR"
  WriteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "Java" "Enabled" "1"
  WriteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "Trusted Protocols" "mms" '"1,0,"""'
  WriteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "Trusted Protocols" "rtsp" '"1,0,"""'
  WriteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "Trusted Protocols" "mailto" '"2,0,"""'
  WriteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "Trusted Protocols" "Thunder" '"0,0,"$INSTDIR\Program\Thunder.exe""'
StrCpy $0 "$APPDATA\Opera\Opera\profile\opera6.ini"
StrCpy $1 "$APPDATA\Opera\Opera\profile\opera6.ini"
StrCpy $2 UTF-8
unicode::FileAnsi2Unicode "$0" "$1" $2
Pop $3
send:
SectionEnd
Sectiongroupend

SectionGroup /e  "可选功能组件" seckx
Section "迅雷会员注册向导" sec06
  SectionIn 1 2
  SetOverwrite try
  SetOutPath "$INSTDIR\Components\BaseCommunity"
  File /r "BaseCommunity\*.*"
SectionEnd
Section "悬浮窗" sec07
  SectionIn 1 2 RO
  SetOverwrite try
  SetOutPath "$INSTDIR\Components\FloatPanel"
  File /r "FloatPanel\*.*"
SectionEnd
Section "每日提示" sec08
  SectionIn 1
  SetOverwrite try
  SetOutPath "$INSTDIR\Components\Tips"
  File /r "Tips\*.*"
SectionEnd
Section "横幅广告" sec09
  SectionIn 1
  SetOverwrite off
  SetOutPath "$INSTDIR\Components\Streamer"
  File /r "Streamer\*.*"
SectionEnd
Section "迷你首页" sec10
  SectionIn 1
  SetOverwrite off
  SetOutPath "$INSTDIR\Components\MiniMedia"
  File /r "MiniMedia\*.*"
SectionEnd
Section "自动更新" sec11
  SectionIn 1
  SetOverwrite try
  SetOutPath "$INSTDIR"
  File /r "zdgx\*.*"
SectionEnd
Sectiongroupend
SectionGroup /e  "功能扩展组件" seczj
Section "迅雷看看【推荐】" sec12
  SectionIn 1 2
  SetOverwrite try
  SetDetailsPrint textonly
  DetailPrint "正在安装迅雷看看..."
  SetDetailsPrint listonly
  SetOutPath "$INSTDIR\Components\Kankan"
  File /r "Kankan\*.*"
  RegDLL "$INSTDIR\Components\Kankan\DapCtrl.dll"
  RegDLL "$INSTDIR\Components\Kankan\StreamCtrl.dll"
  RegDLL "$INSTDIR\Components\Kankan\PPlayer.dll"
  RegDLL "$INSTDIR\Components\Kankan\TSF.dll"
  RegDLL "$INSTDIR\Components\Kankan\Codecs\RealMediaSplitter.ax"
  Sleep 1000
  SetOutPath "$INSTDIR\Program"
  File ".\kankan.ico"
  SetOutPath "$INSTDIR\Components\DownHelper"
  SetOverwrite try
  File /r "DownHelper\*.*"
  
  SetOutPath "$COMMONFILES\Thunder Network\KanKan"
  SetOverwrite try
  Delete "$COMMONFILES\Thunder Network\KanKan\*.history"
  File /r "comkk\*.*"
SectionEnd
Section "迅雷软件助手1.5" sec13
  SectionIn 1
  SetDetailsPrint textonly
  DetailPrint "正在安装迅雷软件助手..."
  SetDetailsPrint listonly
  SetOutPath "$INSTDIR"
  SetOverwrite ifnewer
  File /r "rjzs\*.*"
SectionEnd
Section "迅雷听听 1.2" sec14
  SectionIn 1
  SetOverwrite off
  SetDetailsPrint textonly
  DetailPrint "正在安装迅雷听听..."
  SetDetailsPrint listonly
  SetOutPath "$INSTDIR"
  File /r "xltt\*.*"
SectionEnd
Section "狗狗搜索" sec15
  SectionIn 1 2
  SetOverwrite off
  SetDetailsPrint textonly
  DetailPrint "正在安装狗狗搜索..."
  SetDetailsPrint listonly
  SetOutPath "$INSTDIR\Components\GougouSearch"
  File /r "GougouSearch\*.*"
SectionEnd
Section "监视上传和下载" sec16
  SectionIn 1 2
  SetOverwrite off
  SetOutPath "$INSTDIR\Components\ResWorker"
  File /r "ResWorker\*.*"
SectionEnd
Section "下载安全助手" sec17
  SectionIn 1
  SetOverwrite off
  SetOutPath "$INSTDIR"
  File /r "aqzs\*.*"
SectionEnd
Section "皮肤界面控件" sec18
  SetDetailsPrint textonly
  DetailPrint "正在安装皮肤控件..."
  SetDetailsPrint listonly
  SectionIn 1 2 RO
  SetOverwrite off
  SetOutPath "$INSTDIR\Components\SkinEngine"
  File /r "SkinEngine\*.*"
SectionEnd
Section "其它皮肤" sec19
  SectionIn 1 2 RO
  SetOverwrite off
  SetOutPath "$INSTDIR"
  File /r "rjpf\*.*"
SectionEnd
Sectiongroupend

SectionGroup /e  "程序优化" secyh
Section "会员限制破解" sec20
  SectionIn 1 2
  SetOverwrite on
  SetOutPath "$INSTDIR\Program"
  File "XLUser\XLUser.dll"
SectionEnd
Section "禁止后台上传" sec21
  SectionIn 1
  SetFileAttributes "$SYSDIR\cid_store.dat" 0
  Delete "$SYSDIR\cid_store.dat"
  CreateDirectory "$SYSDIR\cid_store.dat"
  SetFileAttributes "$INSTDIR\Program\cid_store.dat" 0
  Delete "$INSTDIR\Program\cid_store.dat"
  CreateDirectory "$INSTDIR\Program\cid_store.dat"
SectionEnd
Section "屏蔽后台上传端口" sec22
  SectionIn 1
  SetFileAttributes "$SYSDIR\pub_store.dat" 0
  Delete "$SYSDIR\pub_store.dat"
  CreateDirectory "$SYSDIR\pub_store.dat"
  SetFileAttributes "$INSTDIR\Program\pub_store.dat" 0
  Delete "$INSTDIR\Program\pub_store.dat"
  CreateDirectory "$INSTDIR\Program\pub_store.dat"
SectionEnd
Sectiongroupend
Section -Post
  WriteUninstaller "$INSTDIR\uninst.exe"
  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\Program\Thunder.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\Program\Thunder.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
Section Uninstall
SetDetailsPrint textonly
DetailPrint "正在卸载$(^Name)..."
SetDetailsPrint none
/*
  ExecWait  '"$INSTDIR\Program\SetupHelper.exe" /exit_thunder5'
  ExecWait  '"$INSTDIR\Program\SetupHelper.exe" /delete_bho'
  ExecWait  '"$INSTDIR\Program\SetupHelper.exe" /close_firewall'
  ExecWait  '"$INSTDIR\Program\LanguageSetter.exe" fromfile|-1'
  Exec '"$INSTDIR\Program\xlfw.exe" r Thunder $INSTDIR\Program\Thunder.exe'
  Exec '"$INSTDIR\Program\xlfw.exe" r Thunder LiveUpdate $INSTDIR\Program\Liveupdate\ThunderLiveUD.exe'
*/
  UnRegDLL "$INSTDIR\Program\mp.dll"
  UnRegDLL "$INSTDIR\Program\stream.dll"
  UnRegDLL "$INSTDIR\ComDlls\ThunderAgent.dll"
  UnRegDLL "$INSTDIR\ComDlls\XunLeiBHO.dll"
  UnRegDLL "$INSTDIR\ComDlls\TdAtOnce.dll"
  UnRegDLL "$INSTDIR\Components\Kankan\DapCtrl.dll"
  UnRegDLL "$INSTDIR\Components\Kankan\StreamCtrl.dll"
  UnRegDLL "$INSTDIR\Components\Kankan\PPlayer.dll"
  UnRegDLL "$INSTDIR\Components\Kankan\TSF.dll"
  UnRegDLL "$INSTDIR\Components\Kankan\Codecs\RealMediaSplitter.ax"
  Delete "$INSTDIR\Program\LiveUpdate\LiveUpdate\*.*"
  Delete "$INSTDIR\Program\LiveUpdate\*.*"
  Delete "$INSTDIR\Program\profiles\*.*"
  Delete "$INSTDIR\Program\temp\*.*"
  Delete "$INSTDIR\Program\XLGUIPlatform.dll.log\*.*"
  Delete "$INSTDIR\Program\*.*"
  Delete "$INSTDIR\Plugins\*.*"
  Delete "$INSTDIR\ComDlls\*.*"
  Delete "$INSTDIR\Components\*.*"
  Delete "$INSTDIR\Language\*.*"
  Delete "$INSTDIR\Profiles\*.*"
  Delete "$INSTDIR\Skin\*.*"
  Delete "$INSTDIR\Skin2\*.*"
  Delete "$INSTDIR\Program\Thunder.exe"
  Delete "$INSTDIR\uninst.exe"
  Delete "$INSTDIR\*.*"
;  Delete /REBOOTOK "$INSTDIR\ComDlls\TDAtOnce_Now.dll"
;  Delete /REBOOTOK "$INSTDIR\ComDlls\xunleiBHO_Now.dll"
  RMDir "$INSTDIR\Program\LiveUpdate\LiveUpdate"
  RMDir "$INSTDIR\Program\LiveUpdate"
  RMDir /r "$INSTDIR\Program"
  RMDir /r "$INSTDIR\Languages"
  RMDir /r "$INSTDIR\ComDlls"
  RMDir /r "$INSTDIR\Components"
  RMDir /r "$INSTDIR\Skin"
  RMDir /r "$INSTDIR\Skin2"
  RMDir /r "$INSTDIR\Program\temp"
  RMDir /r "$INSTDIR\Plugins"
  RMDir /r "$INSTDIR\Profiles"
  RMDir /r "$INSTDIR\Program\XLGUIPlatform.dll.log"
  RMDir /r "$PROGRAMFILES\Thunder Network\Thunder"
  RMDir /r "$PROGRAMFILES\Thunder Network"
  RMDir "$INSTDIR"
  Delete "$DESKTOP\迅雷5.lnk"
  Delete "$SMPROGRAMS\迅雷软件\迅雷5\启动迅雷5.lnk"
  Delete "$SMPROGRAMS\迅雷软件\迅雷5\更新信息.lnk"
  Delete "$SMPROGRAMS\迅雷软件\迅雷5\卸载迅雷5.lnk"
  Delete "$QUICKLAUNCH\启动迅雷5.lnk"
  RMDir "$SMPROGRAMS\迅雷软件\迅雷5"
  RMDir "$SMPROGRAMS\迅雷软件"
  RMDir ""
  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
  DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
  ReadRegStr $1 HKCU "Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载" ""
  StrCmp $1 "$INSTDIR\Program\GetUrl.htm" 0 next
  DetailPrint "删除IE支持(注册表)。"
DeleteRegValue HKCU "Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载" "Contexts"
DeleteRegValue HKCU "Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载全部链接" "Contexts"
DeleteRegKey HKCU "Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载"
DeleteRegKey HKCU "Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载全部链接"
DeleteRegKey HKLM "SOFTWARE\Microsoft\Internet Explorer\Extensions\{09BA8F6D-CB54-424B-839C-C2A6C8E6B436}"
  Goto delbt
  next:
  DetailPrint " "
  delbt:
  ReadRegStr $2 HKCR "bittorrent\shell\open\command" ""
  StrCmp $2 "$\"$INSTDIR\Program\Thunder.exe$\" /openfile $\"%1$\"" 0 continue
  DeleteRegKey HKCR "bittorrent\shell\open\command"
  DeleteRegKey HKCR "bittorrent\shell\open"
  DeleteRegKey HKCR "bittorrent\shell"
  DeleteRegKey HKCR "bittorrent\DefaultIcon"
  DeleteRegKey HKCR "bittorrent"
  continue:
  DeleteRegKey HKLM "SOFTWARE\Thunder Network\ThunderOem\thunder_backwnd"
  DeleteRegKey HKLM "SOFTWARE\Thunder Network\ThunderOem"
  DeleteRegKey HKLM "SOFTWARE\Thunder Network"
  DeleteRegValue HKCR "thunderim" ""
  DeleteRegValue HKCR "thunderim" "URL Protocol"
  DeleteRegValue HKCR "thunderim\shell\open\command" ""
  DeleteRegKey HKCR "thunderim\shell\open\command"
  DeleteRegKey HKCR "thunderim\shell\open"
  DeleteRegKey HKCR "thunderim\shell"
  DeleteRegKey HKCR "thunderim"
  
  IfFileExists "$APPDATA\Opera\Opera\profile\menu\menu_thunder.ini" 0 oth
  Delete "$APPDATA\Opera\Opera\profile\menu\menu_thunder.ini"
  DeleteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "User Prefs" "Error Console Filter"
  DeleteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "User Prefs" "User JavaScript File"
  DeleteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "User Prefs" "User JavaScript"
  DeleteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "User Prefs" "Always Load User JavaScript"
  DeleteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "User Prefs" "Toolbar Configuration"
  DeleteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "User Prefs" "Menu Configuration"
  DeleteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "User Prefs" "Source Viewer"
  DeleteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "User Prefs" "Source Viewer Mode"
  DeleteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "Saved Settings" "Open Dir"
  DeleteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "Java" "Enabled"
  DeleteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "Trusted Protocols" "mms"
  DeleteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "Trusted Protocols" "rtsp"
  DeleteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "Trusted Protocols" "mailto"
  DeleteINIStr "$APPDATA\Opera\Opera\profile\opera6.ini" "Trusted Protocols" "Thunder"
  oth:
  Delete "$COMMONFILES\Thunder Network\*.*"
  rmdir /r "$COMMONFILES\Thunder Network"
  SetFileAttributes "$SYSDIR\cid_store.dat" 0
  Delete "$SYSDIR\cid_store.dat"
  SetFileAttributes "$SYSDIR\pub_store.dat" 0
  Delete "$SYSDIR\pub_store.dat"
  RMDir /r /REBOOTOK "$PROGRAMFILES\Thunder Network\Thunder"
  
  System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
  HideWindow
  MessageBox MB_ICONINFORMATION|MB_OK "迅雷5 卸载完成。$\r$\r有些内容不能被删除。您可以手工删除它们。"
  SetAutoClose true
ExecShell "open" "http://help.xunlei.com/online/stat_uninst.php?thunderver=5.9.1.922thundertype=4&peerid=00E04CB10906PG44"
SectionEnd

Function .onInit
  !addplugindir "${NSISDIR}\Plugins"
   InitPluginsDir
   File /oname=$PLUGINSDIR\1.gif ".\1.gif"
   File /oname=$PLUGINSDIR\3.gif ".\3.gif"
  System::Call 'kernel32::CreateMutexA(i 0, i 0, t "Thunder5") i .r1 ?e'
  Pop $0
  StrCmp $0 0 +3
    MessageBox MB_OK|MB_ICONEXCLAMATION "本安装程序已经在更早些的时候启动,请退出这一个。"
  Quit
  FindProcDLL::FindProc "Thunder.exe"
   StrCmp $R0 1 +1 +6
     MessageBox MB_ICONINFORMATION|MB_ABORTRETRYIGNORE "检测到 迅雷 正在运行!$\r$\n$\r$\n终止:退出安装程序;$\r$\n忽略:强制结束迅雷进程并继续安装。" /SD IDABORT IDRETRY Retry IDIGNORE Ignore
   Abort
  Retry:
   Goto -4
  Ignore:
   Goto +1
  KillProcDLL::KillProc "Thunder.exe"
FunctionEnd
Function un.onInit
  FindProcDLL::FindProc "Thunder.exe"
    IntCmp $R0 1 0 norun
    MessageBox MB_ICONSTOP " 迅雷5 正在运行,请先关闭程序再进行卸载!"
    Quit
  norun:
    MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "现在将从您的计算机里移除 $(^Name),点击“是”启动卸载程序!" IDYES +2
    Abort
FunctionEnd