Command Line NUS Downloader

Discussion in 'Wii - Hacking' started by wiiNinja, May 5, 2009.

May 5, 2009

Command Line NUS Downloader by wiiNinja at 7:20 PM (8,069 Views / 0 Likes) 37 replies

  1. wiiNinja
    OP

    Member wiiNinja GBAtemp Fan

    Joined:
    Jan 13, 2009
    Messages:
    378
    Country:
    United States
    I had a need to download a few of these titles and couldn't find a command line version of the NUS Downloader: http://wiibrew.org/wiki/NUS_Downloader
    Luckily, the source is available (thanks WB3000). So I created this command line tool:

    http://www.mediafire.com/file/woqyzjozmwk/NUSD.v0.1b.rar

    Version 2.0.mod1: http://www.mediafire.com/file/wuou77c2f2w8...r.v2.0.mod1.rar

    It's useful if you have a bunch of titles to download, and you would like to just batch the job and go grab a soda. There's a Readme.txt file within the rar with more info about how to run. Binary, source, sample batch are included.

    My changes are pretty minimal, all credits go to WB3000 for writing this great tool.

    Updated:

    v0.2 - Added option to retrieve latest version per WiiPower's request.
    v2.0.mod1 - Same mods, using the latest code (v2.0) on SVN. Read the Readme.txt for updated details, including changed default options.
     


  2. pika9323

    Member pika9323 GBAtemp Fan

    Joined:
    Nov 23, 2008
    Messages:
    408
    Country:
    Germany
    Wow thats cool thanks.
    CMD FTW.
     
  3. bdr9

    Member bdr9 GBAtemp Advanced Fan

    Joined:
    Jul 21, 2008
    Messages:
    558
    Country:
    United States
    Thanks. I don't mind using the original one, because my internet is fast and there isn't much waiting involved for me. This would be great for people who would need to wait a while because their internet is slow. Thanks again!
     
  4. WiiPower

    Member WiiPower GBAtemp Guru

    Joined:
    Oct 17, 2008
    Messages:
    8,165
    Country:
    Germany
    An option to download the latest IOS version could be nice. If you use tmd instead of tmd.version, you get the latest version. Nice application.
     
  5. wiiNinja
    OP

    Member wiiNinja GBAtemp Fan

    Joined:
    Jan 13, 2009
    Messages:
    378
    Country:
    United States
    It's probably more useful for cases where you want to download a whole bunch and just want to run a single batch file like this:

    SampleBatch.bat content:


    Code:
    nusd 000000010000000b 10
    nusd 000000010000000c 6
    nusd 000000010000000d 10
    nusd 000000010000000f 257
    nusd 0000000100000011 512
    nusd 0000000100000014 12
    nusd 0000000100000015 514
    nusd 000000010000001e 1040
    nusd 000000010000001f 1040
    nusd 0000000100000021 1040
    nusd 0000000100000022 1039
    nusd 0000000100000023 1040
    nusd 0000000100000024 1042
    nusd 0000000100000025 2070
    nusd 0000000100000026 3610
    nusd 0000000100000035 4113
    nusd 0000000100000037 4633
    nusd 000000010000003c 6174
    nusd 000000010000003d 4890
    nusd 0000000100000002 417
    Just run "SampleBatch.bat" and walk away. You don't have to sit there for the completion of one, then enter the titleID/titleVersion for another.

    Posts merged

    I'll take a crack at it.
     
  6. assassda

    Member assassda GBAtemp Regular

    Joined:
    Jul 31, 2004
    Messages:
    283
    Country:
    United States
    Great Job! been looking for this thanks a lot
     
  7. wiiNinja
    OP

    Member wiiNinja GBAtemp Fan

    Joined:
    Jan 13, 2009
    Messages:
    378
    Country:
    United States
    Thanks for the hint. I've updated the tool to allow the option of retrieving the latest version. Just replace the titleVersion with a * to download the latest.
     
  8. BillandAlisha

    Member BillandAlisha GBAtemp Regular

    Joined:
    Dec 10, 2008
    Messages:
    185
    Location:
    Michigan
    Country:
    United States
    Sweet! Thanks for the Command.
     
  9. Slowking

    Member Slowking GBAtemp Maniac

    Joined:
    Dec 31, 2006
    Messages:
    1,396
    Country:
    Germany
    This is a really great tool and I intend to use it a lot. However I do sometime get net frameworks errors. Could you fix that wiiNinja?
     
  10. wiiNinja
    OP

    Member wiiNinja GBAtemp Fan

    Joined:
    Jan 13, 2009
    Messages:
    378
    Country:
    United States
    Didn't know anyone's still using this tool.
    Without know more about your error and how to duplicate it, I wouldn't know how to fix it. What I did was just to rebuild the tool targeting .NET framework 3.5 instead of 2.0. See if this helps:

    http://www.mediafire.com/file/xf1w08kfu1qk...5.framework.rar

    I don't have too much time at the moment, but if there's interest, the best thing to do is to pick up the latest version of NUSD and mod that.
     
  11. Slowking

    Member Slowking GBAtemp Maniac

    Joined:
    Dec 31, 2006
    Messages:
    1,396
    Country:
    Germany
    Thx. Will try it and if the error pops up again I'll post a screenshot.

    Btw. I think NUSAD uses your tool to download stuff...
     
  12. XFlak

    Member XFlak Wiitired but still kicking

    Joined:
    Sep 12, 2009
    Messages:
    9,122
    Location:
    Ontario
    Country:
    Canada
    WiiNinja, A LOT of people are using this without even realizing it. I use it in NUSAD (I give u credit too, see my signature). But I guarantee any extra effort u put into making this more stable will benefit thousands of people

    edit: damn, how did the SLOWKING beat me to this post! I guess he's not as slow as he sounds! lol

    edit2: @ WiiNinja, is the version that targets 3.5 .net framework the same one u released months ago????????
     
  13. wiiNinja
    OP

    Member wiiNinja GBAtemp Fan

    Joined:
    Jan 13, 2009
    Messages:
    378
    Country:
    United States
    Yes, it is the same version; I just rebuilt it for .net 3.5. I'll look at the latest version and see if I can create a new version out of that. What sort of error are you seeing? Is it repeatable or just random?
     
  14. XFlak

    Member XFlak Wiitired but still kicking

    Joined:
    Sep 12, 2009
    Messages:
    9,122
    Location:
    Ontario
    Country:
    Canada
    its very VERY random. It says something like... an error has occured with nusd.exe, please press exit\continue to close it or something. I wish I could remember better, the next time I get the error I will take a screenshot (but that could be a long time coming... since I've only gotten the error maybe 4 times, and I've used it regularly for over 8 months)

    on the bright side, i have checks and safeguards built into NUSAD so that when/if this happens, it is caught and redownloaded

    I'm gonna use this new 3.5 framework version, that may make a world of difference, we'll find out
     
  15. Slowking

    Member Slowking GBAtemp Maniac

    Joined:
    Dec 31, 2006
    Messages:
    1,396
    Country:
    Germany
    Btw. sometimes it just hangs without an error at the "XXX wrote at XXX" part.
    Haven't tested the frameworks 3.5 version yet, though.

    Edit: hmm the 3.5 version seems to run smoother and faster. No error yet. We'll see how it does long term. ^^

    Edit2: And it hung itself again. This time without error message: http://zeldaspeedruns.com/junk/error.png
     
  16. Slowking

    Member Slowking GBAtemp Maniac

    Joined:
    Dec 31, 2006
    Messages:
    1,396
    Country:
    Germany
    Well now I encountered the frameworks error again. The 3.5 doesn't seem to fix it. [​IMG]

    Basically the program tried to read or write in protected memory...


    Oh btw there is also another bug i've noticed. It packs wads even if you don't have "packwad" in the commandline...
     
  17. wiiNinja
    OP

    Member wiiNinja GBAtemp Fan

    Joined:
    Jan 13, 2009
    Messages:
    378
    Country:
    United States
    I used the latest version found on SVN (v2.0) and applied my mods again. The new mod is found here:

    http://www.mediafire.com/file/8ftbcp4attdh...d1.wiiNinja.rar

    See if this one crashes using the same batch that you used before. I ran this several hundred times without errors, so hopefully it'll be better. But if you do see the error again, please include your batch file so I can try it as well.

    In the old version, the default "packwad" is ON, but in this new version, the default is OFF. It may impact old batch files, but I think this makes more sense.
     
  18. Slowking

    Member Slowking GBAtemp Maniac

    Joined:
    Dec 31, 2006
    Messages:
    1,396
    Country:
    Germany
    [​IMG]
     
  19. wiiNinja
    OP

    Member wiiNinja GBAtemp Fan

    Joined:
    Jan 13, 2009
    Messages:
    378
    Country:
    United States
  20. Slowking

    Member Slowking GBAtemp Maniac

    Joined:
    Dec 31, 2006
    Messages:
    1,396
    Country:
    Germany
    Thx will test the crap out of it. ^^

    So is this compiled with net frameworks 2.0 or 3.5? Just curious.
     

Share This Page