# BannedMusic.org Easy Download Torrent Wrapper Script # Note: we are always looking for improvements, so if you have a # suggestion, please let us know. Anything that makes it # easier to create a downloader or to use one will increase # adoption and will let more websites host very large files. # ----- INSTRUCTIONS TO CREATE A TORRENT WRAPPER ----- # If you do not already have a torrent file created, tracked, # and seeded, please see the instructions at: # bannedmusic.org/wrapper.html # 1. Create a directory that contains the following: # a. The BitTorrent directory # b. This script file # c. Your .torrent file # 2. Look for the 2 "IMPORTANT" sections in the code below # to enter the name of your torrent file. # 3. Save your changes to this script and then open it # with "MakeNSIS.exe". If you don't have NSIS, you can # download it here: # http://nsis.sourceforge.net/home/ # 4. MakeNSIS should automatically create the installer in the same # directory as this script. Be sure to test the installer and rename # it to match your torrent. The downloader is working properly if # after double-clicking, there is a short pause and then BitTorrent # opens and begins downloading the file(s). # ---------------------------------------------------- # The name of the installer app that is created: Outfile grey_album_downloader.exe Name BitTorrent SilentInstall silent # Where BitTorrent is installed # This also affects where the downloaded torrent is installed. We recommend leaving this directory unchanged. InstallDir "$DESKTOP\BitTorrent\" # This is the main install section Section "Install" WriteUninstaller "$INSTDIR\uninstall.exe" SetOutPath $INSTDIR # Installs the necessary BitTorrent files # BitTorrent by Bram Cohen # see LICENSE.txt for license information File "BitTorrent\_socket.pyd" File "BitTorrent\_sre.pyd" File "BitTorrent\_ssl.pyd" File "BitTorrent\_winreg.pyd" File "BitTorrent\datetime.pyd" File "BitTorrent\select.pyd" File "BitTorrent\wxc.pyd" File "BitTorrent\zlib.pyd" File "BitTorrent\python23.dll" File "BitTorrent\wxmsw24h.dll" File "BitTorrent\redirdonate.html" File "BitTorrent\bittorrent.ico" File "BitTorrent\library.zip" File "BitTorrent\LICENSE.txt" File "BitTorrent\btdownloadgui.exe" File "BitTorrent\uninstall.exe" File "BitTorrent\w9xpopen.exe" # ---------IMPORTANT #1: This installs your torrent file.--------- # Rename this file to match your torrent and be # sure that the torrent file is in the directory # where this script is located. File "GreyAlbum.torrent" # This registers BitTorrent as the program that opens .torrent files # (We're looking for a more elegant solution that would # check to see if there's another program already registered, # suggestions would be appreciated on this) WriteRegStr HKCR .torrent "" BitTorrent.torrent WriteRegStr HKCR "MIME\Database\Content Type\application/x-bittorrent" Extension .torrent WriteRegStr HKCR BitTorrent.torrent "" "TORRENT File" WriteRegBin HKCR BitTorrent.torrent EditFlags 00000100 WriteRegStr HKCR "BitTorrent.torrent\shell" "" open WriteRegStr HKCR "BitTorrent.torrent\shell\open\command" "" '$INSTDIR\btdownloadgui.exe "%1"' WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BitTorrent" "DisplayName" "BitTorrent 3.4.1" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BitTorrent" "UninstallString" '"$INSTDIR\uninstall.exe"' # -----IMPORTANT #2: This begins the download of your torrent.------ # Rename the torrent file in this line of code to match your torrent file. Exec "$INSTDIR\btdownloadgui.exe TheDoubleBlackAlbum.torrent --saveas ../" # Other stuff... SectionEnd Section "Uninstall" DeleteRegKey HKCR .torrent DeleteRegKey HKCR "MIME\Database\Content Type\application/x-bittorrent" DeleteRegKey HKCR BitTorrent.torrent DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BitTorrent" RMDir /r "$INSTDIR" SectionEnd