12 May 2010

Multiple Dropbox (Do It Yourself)

Great chance you know already how to run multiple dropbox... the very easy way
Yes, by using run as (that is right click on the dropbox shortcut choose "run as.." then select user other than current user) in XP, best candidate for "other user" is administrator because it's ghost user (not shown in login screen by default)

Or you can use dropboxen

But let me tell you another way, no need additional programs, no need to create another users, much flexible, portable and more DIYer :)

Right click on dropbox shortcut in startmenu, click properties, in target box look for where dropbox.exe installed in my case:


"C:\Users\qwerty\Application Data\Dropbox\bin\Dropbox.exe" /home


Now prepare create a new folder yourself where you will place a copy of installed dropbox, it could be anywhere even flashdisk.
Browse with explorer to until you reach bin folder (of target box above). There copy all files to your prepared folder -> this means you should have dropbox.exe there.

Sample of bat triggered version (for dropbox < 1.2.x)

@ECHO OFF
SET USERNAME=Joni
SET USERPROFILE=%~dp0%USERNAME%
MD "%USERPROFILE%\My Documents\Dropbox">nul
MD "%USERPROFILE%\AppData\Roaming">nul
MD "%USERPROFILE%\Application Data">nul
START Dropbox


Paste above text in notepad.

A little explanation, what I basically do above is to trick dropbox for thinking that it has been run by another user. Back again, you may freely change "Joni" into anything. it doesn't matter if the username doesn't even exist in your windows.

Save your notepad before as "drop1.bat" in your prepared folder too.
Double click that drop1.bat :) You know what to do next..

Recreate bat file with different username if you need more dropbox.

these steps has been tested on Dropbox 0.7.110 and 1.1.x and under Windows XP and Windows 7 (from VM)

Alternate bat (shortcut triggered) much flexible but need care (for dropbox < 1.2.x)   :

@ECHO OFF
SET USERNAME=%1
SET USERPROFILE=%~dp0%USERNAME%
MD "%USERPROFILE%\My Documents\Dropbox">nul
MD "%USERPROFILE%\AppData\Roaming">nul
MD "%USERPROFILE%\Application Data">nul
START Dropbox


Save it as droploader.bat in your prepared folder.
In this case, you didn't need to recreate/edit another bat file if you need another dropbox.
Instead create a shortcut of droploader.bat, Right click the shortcut and click properties. In target box add argument to droploader.bat with [username] each time you need more dropbox.
for ex in target box.:
D:\Dropbox\bin\droploader.bat joni
It will automatically setup everything for account Joni, just run the shortcut (O yeah, it would be neater if you rename the shortcut with [username] like "Joni's Dropbox" then copy this shortcut to your desktop, to your startup folder... wherever you want)

In Windows XP:
In Windows 7:


For version >1.2.x (thanks to MRACHINI, my dropbox also screwed up after upgrading):
Unfortunately this dropbox use stored id in registry (in short this trick no longer applicable elegantly). Here is how anyway:


@ECHO OFF
::by tumagonx
::not for exploitation!
SET OLDNAME=%USERNAME%
SET USERNAME=Joni
SET USERPROFILE=%~dp0%USERNAME%
regsvr32 /s %~dp0%DropboxExt.13.dll
md "%USERPROFILE%\My Documents\Dropbox">nul
md "%USERPROFILE%\Application Data">nul
if /i exist "%USERPROFILE%\Application Data\Dropbox\config.dbx" (
if /i not exist "%USERPROFILE%\Application Data\Dropbox\sigstore.dbx" del /q "%USERPROFILE%\%USERNAME%.reg"
)
md "%USERPROFILE%\AppData\Roaming">nul
if /i exist "%USERPROFILE%\AppData\Roaming\Dropbox\config.dbx" (
if /i not exist "%USERPROFILE%\AppData\Roaming\Dropbox\sigstore.dbx" del /q "%USERPROFILE%\%USERNAME%.reg"
)
if /i exist "%USERPROFILE%\%USERNAME%.reg" goto startnow
msg %OLDNAME% /w "Firt time initialization for %USERNAME%!, once dropbox done please exit via systray icon. You may re-run later"
Dropbox
reg export HKCU\Software\Dropbox\ks "%USERPROFILE%\%USERNAME%.reg"
goto EOF
:startnow
reg import "%USERPROFILE%\%USERNAME%.reg"
start Dropbox


You may not execute all of your accounts sequentially, you must wait previous dropbox until becoming "checked icon" before running other account. Enjoy!
And for Win7 users, follow these screenies if you're feeling lost:



Shortcut triggered version, for anyone who know how to figure it out :)

@ECHO OFF
::by tumagonx
::not for exploitation!
SET OLDNAME=%USERNAME%
:init
SET USERNAME=%1
SET USERPROFILE=%~dp0%USERNAME%
regsvr32 /s %~dp0%DropboxExt.13.dll
md "%USERPROFILE%\My Documents\Dropbox">nul
md "%USERPROFILE%\Application Data">nul
if /i exist "%USERPROFILE%\Application Data\Dropbox\config.dbx" (
if /i not exist "%USERPROFILE%\Application Data\Dropbox\sigstore.dbx" del /q "%USERPROFILE%\%USERNAME%.reg"
)
md "%USERPROFILE%\AppData\Roaming">nul
if /i exist "%USERPROFILE%\AppData\Roaming\Dropbox\config.dbx" (
if /i not exist "%USERPROFILE%\AppData\Roaming\Dropbox\sigstore.dbx" del /q "%USERPROFILE%\%USERNAME%.reg"
)
if /i exist "%USERPROFILE%\%USERNAME%.reg" goto startnow
msg %OLDNAME% /w "Firt time initialization for %USERNAME%!, once dropbox done please exit via systray icon. You may re-run later"
Dropbox
reg export HKCU\Software\Dropbox\ks "%USERPROFILE%\%USERNAME%.reg"
goto lets_roll
:startnow
if defined wait msg %OLDNAME% /w /time:45 "auto-waiting 45s while previous dropbox running"
reg import "%USERPROFILE%\%USERNAME%.reg"
start Dropbox
:lets_roll
shift
if "%1" == "" (goto EOF) else (set wait=1& goto init)


Remarks:
- Need eligible bonus space? Make sure you run the bat file (only for the first time) from other PC/VM differentiated by IP and/or Computer's name.
- You don't need to use real email to create dropbox account
- In case you wondering, dropbox is free file service provider that offer 2GB space, has client application (based on Python and WxWidget) that do file-synchronization (using librsync via python binding) to server (say goodbye to upload corruption) and the only one that offer true direct download link with decent bandwidth performance https://www.dropbox.com/
- Want to say thanks? click on my referral http://db.tt/krB1KA7 please click, it doesn't hurt, like me you too will get eligible 250MB bonus space!

52 comments:

  1. Thanks tumagonx!

    It works for me, you really stab it right at target. I don't expect it would be that easy!

    Have you consider to create GUI program for it?


    -Fleajky-

    ReplyDelete
  2. Hey, You are the first guy that did it correctly then. I thought no one will try it after I put the link at dropbox's forum. No one reply it :D

    I got some email that claimed they get "permission denied" after reading this post. I just think that they may not have created the "prepared" folder themselves.

    Anyway I just want to point out that Dropbox (which is apparently based on python script) seems only check "username" variable rather than using Windows' registry (for the sake of portability?). Thats make dropbox gullible. But I have no intention to make a real program for it.

    ReplyDelete
  3. Hi,
    thanks for the tool... it does not work for me. I have copied the content of the bin folders in another folder and create the bat file in it. When I launch it from a DOS prompt, my dropbox folder open. That's it. Not another folder associated to another Dropbox account.

    August 4, 2010 10:44 AM

    ReplyDelete
  4. I see a new empty folder named Joni in my "prepared" folder. Then what ?

    ReplyDelete
  5. hi mgascon,

    Are you running Win7?
    Try to run the bat file as administrator...
    Was that "another folder" created by yourself? and are you certain have permission over it (without being asked for administrator privilege)?

    ReplyDelete
  6. Empty? no appdata or application data folder inside?

    ReplyDelete
  7. Hi,

    I have the same problem as mgascon.

    Inside App Data > Roaming, next to the "Dropbox" folder, I have created a new "Dropbox2" folder. I have copied the "Dropbox>bin" folder in "Dropbox2>bin". Inside the Dropbox2>bin I have put the drop1.bat file. When I double click the drop1. bat:
    1. A new folder "Joni" appears, and
    2. I get the following error message: "Dropbox Error:Can't Access Settings
    The Dropbox application didn't start because it is unable to access essential settings files. This is likely the result of a permissions error or can occur if Dropbox is installed on a removable drive.
    More information and steps to resolve this error can be found at our Help Center"

    If I "Run as Administrator" Dropbox2>bin>drop1.bat, I also get a similar error message in the command line, something like "the system can not find the file or directory.

    Any idea?

    I am using Dropbox 0.7.110 on Windows 7.

    ReplyDelete
  8. Here is what the directory folder should appears:
    Dropbox2\bin [You click on drop1.bat]
    then it should create folders this way:

    bin
    +--\joni
    +----\appdata
    +------\roaming
    +----\application data [only used by XP]

    There is no one neither you or mgascon answer my question right before your post >.< This is important, what the error you tell me is because those folders are missing. As far as you don't answer it, I will not help you any further because I'm not using 7even

    ReplyDelete
  9. Hi TumaGonx,

    Thanks for your reply.

    Yes, the folder is empty and I permission over it (it doesn't ask for administrator privilege).

    ReplyDelete
  10. Hi TumaGonx,

    Thanks for your reply.

    Yes, the folder is empty and I have permission over it (it doesn't ask for administrator privilege).

    ReplyDelete
  11. Hi Pak,

    Ok then, you may try the follwing step

    -Try make "AppData" folder inside Joni, and "Roaming" folder inside AppData. Then run drop1.bat again?

    -If above step failed with the same message, try move your dropbox2 folder to somewhere else like D:\Dropbox2 because I don't know where currently you put dropbox2 folder...

    ReplyDelete
  12. Hi Tumagonx,

    I tried both steps and they don't work. Same mistake. I have moved (even re-created from zero) the dropbox2 folder out of the "Users" folder, in A:\dropbox2, B:\dropbox2... (I have several partitions in my hard drive) but with no avail.

    There must be something with Windows permissions. Don't worry I will try some of the other methods.

    Thanks for your patience and help.

    There must be something with Windows permissions that I can't fix.

    ReplyDelete
  13. Well, thanks for your confirmation (I'm not so patient actually :p) I think 4 people have reported the same issues. Unfortunately I'm not using or quite familiar with Windows 7.

    I only test it a couple of time under VM and since it was a fresh install (now expired) I assumed it should works on other 7 too.

    It would be nice if you try copying it to other computer with Windows 7 just to make sure if your system have a problem...

    Thanks

    ReplyDelete
  14. Thank you.
    Very simple and clear.I like this approach.

    ReplyDelete
  15. Thank you for this tutorial, it was what I was looking for, and it worked grate.

    ReplyDelete
  16. Hi,
    It worked well for me but I have a problem getting a new "My Dropbox" folder without combining the info from the original. I tried moving the first to the desktop and making the next in My Documents. That did not work either. Both instances in the toolbar below link to separate online accounts so that is working. Any help would be appreciated.
    Bob

    ReplyDelete
  17. Sorry if I don't get your point about "without combining the info"...

    But if you already have My dropbox somewhere else you can just point it when dropbox initialize right?

    if info is dropbox's setting then aren't you use different name for each email account? each account will kept in their own "name" folder you're defined in that bat file

    ReplyDelete
  18. Awesome! Worked like a charm for me..
    Thanks a lot..

    ReplyDelete
  19. Wow! I am not a particularly programming-savy person, but your directions are so straigtforward that even I could follow and execute them properly. Works GREAT! Thanks so very much!

    ReplyDelete
  20. Thank you my friend....this solution has worked for me, on W7, without a hitch.....

    I have posted thanks in the Dropbox forum as danny m:

    http://forums.dropbox.com/topic.php?id=17952&replies=21#post-329193

    ReplyDelete
  21. Thank you very much. It works perfectly for me (on WinXP). No surprise at all.

    ReplyDelete
  22. Thank you! It works perfectly on Windows 7. :)

    ReplyDelete
  23. Thank you very much. =)

    /Andreas

    ReplyDelete
  24. I did it but I didn't get the referral bonus. :o

    ReplyDelete
  25. Dude you're resurrect aging post :D

    Anyway what you did?
    To get eligible bonus you need to initialize your other account under different computer name (see your system properties) and different IP.

    How I did is:
    register the referral under virtual machine (virtualbox, vmware, whatever) and proxied the virtual LAN (so dropbox.com recognized it as from other IP)

    If you have dynamic IP just replug your modem to get new IP or use command: ipconfig /renew

    ReplyDelete
  26. Really interesting and worked both in XP as well as in 7. No more live mesh... sucks a lot!

    ReplyDelete
  27. Now youu mention it... I have an idea
    If you know about junction you could (in case running dual windows) link "%USERPROFILE%\Appdata"\Roaming to "%USERPROFILE%\Application Data" thus the same dropbox username/account will work instantly whenever switching windows

    ReplyDelete
  28. hey,

    i tried it but whenever i reach the select Dropbox folder, i cant select anything because the list is empty, i can only press OK and doing so will place new Dropbox files in the current user's Dropbox folder.

    so i changed my main Dropbox's folder so now each on has its own folder but still it resets my main Dropbox installation, so i have to set it up again with username and password and let it resync and reindex.

    any ideas.

    I'm using windows 7

    Thank You
    MR

    ReplyDelete
  29. yo mr,

    what do you mean with "reach the select Dropbox folder"?
    what list?

    if you know where dropbox.exe located just grab that file and python25.dll and copy to your prepared folder, what so difficult about that?

    ReplyDelete
  30. oh, no no i already put all files in the folder and created the bat file and started dropbox, but after you start setting up dropbox at the end it asks if you want to change the defauld folder location, and if you click the radio button and browse to select the custom location it doesnt display anything.

    ReplyDelete
  31. Roger that :) updating the bat (see post)

    But don't have access to Win7 to try.. good luck

    ReplyDelete
  32. you need to delete %USERNAME% folder first before retry

    thanks for your report

    ReplyDelete
  33. @MRACHINI

    tested on Win7, dropbox 1.2.52
    see screenshot

    ReplyDelete
  34. OK thank you, I'll try it.

    ReplyDelete
  35. OK now i cant select the folder but still when i setup one account it works great but then when i setup the second and try to double click the first shortcut, i have to set it up again

    ReplyDelete
  36. mmmm i got the files from Dropbox V1.1.45, not the latest, and everything is working great, i can even browse to select the folder.
    http://p.twimg.com/AnRz8ulCIAA8Ioz.png:large

    ReplyDelete
  37. Hey there, i have made a script by myself for multiple dropboxes. It requires new accounts.This script works on windows xp, if you are using win7 or vista you might need to change the folders.
    Copy this script into a text file , and rename the file with extension .vbs

    set WshShell = WScript.CreateObject("WScript.Shell")
    WshShell.run"cmd.exe"
    WScript.Sleep 500
    WshShell.SendKeys "c:"
    WshShell.SendKeys "{ENTER}"
    WScript.Sleep 30
    WshShell.SendKeys "cd C:\Documents and Settings\YourOtherUser\Application Data\Dropbox\bin" 'YourOtherUser-Type your secondary user
    WScript.Sleep 30
    WshShell.SendKeys "{ENTER}"
    WshShell.SendKeys "runas/user:local\YourOtherUser dropbox.exe" 'Type your secondary user
    WScript.Sleep 30
    WshShell.SendKeys "{ENTER}"
    WshShell.SendKeys "123123" 'send password
    WScript.Sleep 30
    WshShell.SendKeys "{ENTER}"
    WshShell.SendKeys "exit"
    WshShell.SendKeys "{ENTER}"
    set wshshell = nothing

    ReplyDelete
  38. Why not plain batch file? Why need to create accounts? sheesh

    ReplyDelete
  39. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. Ok sorry, new question. The accounts are still there but how do i make windows 7 start all dropbox accounts when i restart

      Delete
    2. Unlikely, you might want the second batch which has timer, but then it depends on how fast your connection is and how stable dropbox connection at that time, in short there is no precise way to determine the delay between accounts. Once you make mistake (you start another when previous one not yet finished its initialization) then your accounts will be unlinked.

      Delete
    3. well thank you for all the effort. you saved me a bunch of time.

      Delete
  40. Well, I had been using several different methods, all of which broke when Drobox updated last. The original .bat method at the top here worked great.

    So I took that .bat and tried to modify it for Google Drive to achieve the same thing, but I must not have changed everything I needed to. Any idea if this .bat can be modified to allow multiple Google Drive instances on one machine/user?

    The googledrivesync.exe is stored in [C:\Program Files\Google\Drive] along with a googledrivesync32.dll and that is it.

    I tried:
    @ECHO OFF
    SET USERNAME=googledrive2
    SET USERPROFILE=%~dp0%USERNAME%
    MD "%USERPROFILE%\My Documents\Google">nul
    MD "%USERPROFILE%\AppData\Roaming">nul
    MD "%USERPROFILE%\Application Data">nul
    START googledrivesync

    and:

    @ECHO OFF
    SET USERNAME=googledrive2
    SET USERPROFILE=%~dp0%USERNAME%
    MD "%USERPROFILE%\My Documents\googledrivesync">nul
    MD "%USERPROFILE%\AppData\Roaming">nul
    MD "%USERPROFILE%\Application Data">nul
    START googledrivesync

    And:

    @ECHO OFF
    SET USERNAME=googledrive2
    SET USERPROFILE=%~dp0%USERNAME%
    MD "%USERPROFILE%\My Documents\googledrivesync">nul
    MD "%USERPROFILE%\AppData\Roaming">nul
    MD "%USERPROFILE%\Program Files\Google\Drive">nul
    MD "%USERPROFILE%\Application Data">nul
    START googledrivesync

    Each created the new folder inside the Google\Drive folder I created, but the googledrivesync instance did not start up and manually starting it just opened the existing Google Drive folder. Any ideas?

    ReplyDelete
    Replies
    1. Thanks man, you made my day!
      It's been boringsome without new post.. here is
      http://opensourcepack.blogspot.com/2012/04/multiple-google-drive-do-it-yourself.html

      Delete
  41. Works for me on 7even Thanks!!

    ReplyDelete
  42. TumaGonx Zakkum,

    I just want to say that it is great to see that you genuinely care about the people you write this tutorial for. Good job and thanks ;)

    ReplyDelete
  43. Thanks! Worked perfectly fine in my case!! Very nice tutorial ;) windows7 user

    ReplyDelete
  44. Hey TumaGonx,

    Is there anyway to auto close the batch file after execution?

    ReplyDelete
    Replies
    1. Apparently i used
      Start "" "[path\]Auothotkey.exe" Script.ahk
      and it worked fine. But it seemed to open the a/m program. Is there a more direct way to close the while batch file? I tried EXIT but doesnt work..

      Delete
    2. Not sure what happened...
      maybe "REG" didn't run properly, try remove @ECHO OFF line to see what make it held up.
      if run properly it should quit automatically as "START" supposed to be.

      or maybe the shift and if "%1" == "" part? sorry I don't use dropbox at the moment

      Delete
  45. Thanks! This worked for me (trying it in Win8), but now every time I restart my computer it seems that both dropbox accounts get unsynced and it launches the dropbox setup. I re-sync the first account, and then doubleclick the bat file to do the same with the second account.

    Anyone else encountering something like this? Is there a work around?

    ReplyDelete