1 theshadow 1.33 OutFile "BitTornado-0.4.0-w32install.exe"
2 Name "BitTornado 0.4.0"
|
3 theshadow 1.2 SetCompressor lzma
4 InstallDir "$PROGRAMFILES\BitTornado"
|
5 theshadow 1.1 Icon "icon_bt.ico"
6 UninstallIcon "icon_done.ico"
7 InstallDirRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\btdownloadgui.exe" ""
|
8 theshadow 1.33 DirText "Setup will install BitTornado 0.4.0 in the following folder.$\r$\n$\r$\nTo install in a different folder, click Browse and select another folder."
|
9 theshadow 1.1 ShowInstDetails show
10 ShowUnInstDetails show
11
12 Section "MainGroup" SEC01
13 SetOutPath "$INSTDIR"
14 IfFileExists "$INSTDIR\_psyco.pyd" +1 +2
15 delete "$INSTDIR\_psyco.pyd"
16 SetOverwrite on
|
17 theshadow 1.2 File "*.exe"
18 File "*.dll"
19 File "*.pyd"
20 File "library.zip"
21 CreateDirectory "$SMPROGRAMS\BitTornado"
22 CreateShortCut "$SMPROGRAMS\BitTornado\BitTornado.lnk" "$INSTDIR\btdownloadgui.exe"
23 # CreateShortCut "$DESKTOP\BitTornado.lnk" "$INSTDIR\btdownloadgui.exe"
24 CreateShortCut "$SMPROGRAMS\BitTornado\Uninstall.lnk" "$INSTDIR\uninst.exe"
|
25 theshadow 1.1 SetOverwrite off
26 SectionEnd
27
28 Section -Post
29 WriteRegStr HKCR .torrent "" bittorrent
|
30 theshadow 1.14 WriteRegStr HKCR .torrent "Content Type" application/x-bittorrent
|
31 theshadow 1.1 WriteRegStr HKCR "MIME\Database\Content Type\application/x-bittorrent" Extension .torrent
32 WriteRegStr HKCR bittorrent "" "TORRENT File"
33 WriteRegBin HKCR bittorrent EditFlags 00000100
34 WriteRegStr HKCR "bittorrent\shell" "" open
35 WriteRegStr HKCR "bittorrent\shell\open\command" "" `"$INSTDIR\btdownloadgui.exe" --responsefile "%1"`
36
37 WriteUninstaller "$INSTDIR\uninst.exe"
38 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\btdownloadgui.exe" "" "$INSTDIR\btdownloadgui.exe"
|
39 theshadow 1.33 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BitTornado" "DisplayName" "BitTornado 0.4.0"
|
40 theshadow 1.2 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BitTornado" "UninstallString" "$INSTDIR\uninst.exe"
41 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BitTornado" "DisplayIcon" "$INSTDIR\btdownloadgui.exe"
|
42 theshadow 1.33 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BitTornado" "DisplayVersion" "0.4.0"
|
43 theshadow 1.2 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BitTornado" "URLInfoAbout" "http://www.bittornado.com/"
44 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BitTornado" "Publisher" "John Hoffman"
|
45 theshadow 1.1 SectionEnd
46
47
48 Function un.onUninstSuccess
49 HideWindow
|
50 theshadow 1.33 MessageBox MB_ICONINFORMATION|MB_OK "BitTornado 0.4.0 was successfully removed from your computer."
|
51 theshadow 1.1 FunctionEnd
52
53 Function un.onInit
|
54 theshadow 1.33 MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove BitTornado 0.4.0 and all of its components?" IDYES +2
|
55 theshadow 1.1 Abort
56 FunctionEnd
57
58 Section Uninstall
|
59 theshadow 1.3 Delete "$SMPROGRAMS\BitTornado\BitTornado.lnk"
|
60 theshadow 1.2 # Delete "$DESKTOP\BitTornado.lnk"
61 Delete "$SMPROGRAMS\BitTornado\Uninstall.lnk"
62 RMDir "$SMPROGRAMS\BitTornado"
|
63 theshadow 1.3 # DeleteRegKey HKCR software\bittorrent
|
64 theshadow 1.1
65 push $1
66 ReadRegStr $1 HKCR "bittorrent\shell\open\command" ""
67 StrCmp $1 `"$INSTDIR\btdownloadgui.exe" --responsefile "%1"` 0 regnotempty
68 DeleteRegKey HKCR bittorrent\shell\open
69 DeleteRegKey /ifempty HKCR bittorrent\shell
70 DeleteRegKey /ifempty HKCR bittorrent
71 ReadRegStr $1 HKCR bittorrent\shell ""
72 StrCmp $1 "" 0 regnotempty
73 DeleteRegKey HKCR .torrent
74 DeleteRegKey HKCR "MIME\Database\Content Type\application/x-bittorrent"
75 regnotempty:
76 pop $1
77 RMDir /r "$INSTDIR"
78
|
79 theshadow 1.2 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BitTornado"
|
80 theshadow 1.1 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\btdownloadgui.exe"
81 SetAutoClose true
82 SectionEnd
83
|