HOW TO: Multiple D2R Instances (requires two accounts)

This is how you do it…
I’m going to write this like you’re somewhat of a newb, to make it easy of course.

Open Battlenet launcher

  • Go to settings
    • CTRL+C (copy) install directory
    • Navigate to “App” (top left)
    • Change ‘On Game Launch’ to “Exit Battle.net completely
    • Enable setting at very bottom – “Allow multiple instances of Battle.net
    • Click “Done

Open Windows File Explorer (tip: ‘Win button + E’)

  • In address bar, paste the path you copied and navigate to it
    • By default it should be: “C:\Program Files (x86)\Diablo II Resurrected
    • Right click ‘Diablo II Resurrected Launcher.exe
    • Send to > Desktop (create shortcut)
    • Rename this desktop shortcut to something unique. (EX: ‘1 – D2R Launcher.exe’)
  • Go back to Diablo II Resurrected game folder (C:\Program Files (x86)\Diablo II Resurected) and copy the contents
    • Create a folder somewhere, either on your C: drive, or on an external drive
    • Name the folder “Diablo 2 Resurrected (2)” for you to recognize it
    • Navigate to the new directory, and paste the game files, inside of it
    • Now create a shortcut for this second D2R Launcher.
    • Right click launcher.exe > Send to Desktop (create shortcut)
    • Rename this desktop shortcut to something unique. EX: ‘2 – D2R Launcher.exe

Congratulations, now you have two D2R directories! You wont be able to use both shortcuts without one last thing though…

###!!! Update, new method at bottom !!!###

Download a program called Process Explorer from Microsoft (Google: ‘process explorer’)

Click first link: “Process Explorer - Windows Sysinternals

  • Download it
  • Extract Files somewhere easy, like your desktop or download folder

Launch the first d2r launcher shortcut you created on your desktop

  • Login with an account
  • Launch game

Now go launch the process explorer application as ADMINISTRATOR (press ‘Win+D’ to get to your desktop)

  • Press ‘CTRL + F’ to filter and type ‘d2r
  • You should see ‘D2R.exe
  • Single click D2R.exe to highlight it and press CTRL+L. Observe the list below that pops up
  • You need to find this exact line in that list of gibberish…
    '\Sessions\2\BaseNamedObjects\DiabloII Check For Other Instances’
  • Right click on that and press ‘Close Handle

Now you can launch the second shortcut, login with a second account, and enjoy Diablo the way we used to growing up.**

##########################
NEW METHOD TO CLOSE HANDLE
##########################

I wrote a .bat file to close handle super easy. The .bat must be executed from the same folder containing handle64.exe.

LINK:

  • drive.google.com/drive/folders/1ycE0izXis0ynD1kUv0TLjREdT5rr3RxW?usp=sharing

The .bat MUST be ran as administrator to close the d2r handle successfully. The raw code used is at the end of this post.

NOTE: You will have to close this handle every time you want to run multiple d2r instances.

Q: Can I play 2 characters on same account at the same time?
A: NO, YOU NEED TWO ACCOUNTS (unfortunately)

Q: Why is game not logging in on second account?
A: When you launch the first launcher, you must follow through to logging in completely in the first game instance. THEN login using the second launcher. By design, the launcher.exe only stores a single login instance at a time, which is the very last used login (from the bnet launcher). D2R must be opened to at least the character menu to be considered ‘logged in’ and ready to proceed to closing handle/logging in on another account.


RAW .BAT CODE TO CLOSE HANDLE

@echo off
setlocal EnableDelayedExpansion

:: RAN AS ADMINISTRATOR? CHECK/FIX IF NOT ::
:-------------------------------------
REM  --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"

REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
    echo. &echo. &echo. &echo.
    echo    Run as admin to close handle.
    echo      Requesting privilages.... &echo.
    goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"

    "%temp%\getadmin.vbs"
    exit /B

:gotAdmin
    if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
    pushd "%CD%"
    CD /D "%~dp0"
:--------------------------------------



FOR /F %%I in ('handle64 -p D2R.exe -a "DiabloII Check For Other Instances" -nobanner') do set STOP_FLAG=%%I


:: PRIMARY SCRIPT ::
:while

    if %STOP_FLAG% == No (
	mode con cols=51 lines=9 >nul
	echo. & echo. & echo. 
	echo       #######################################
        echo                 ~ NO OPEN HANDLES ~          
	echo       #######################################
	echo. &echo.
        goto :DONE
    )

:: SET CONSOLE WINDOW SIZE ::
mode con cols=51 lines=16 >nul

:: SET PID/HEX VALUES FOR PROCESS HANDLE ::
    FOR /F "tokens=2,3 delims=:" %%A in ('handle64 -p D2R.exe -a ^"DiabloII Check For Other Instances^"') do (
        set pid=%%A
        set hex=%%B
    )


:: DEBUGGING OUTPUT ::
    echo      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    echo                [ DEBUG INFO ] 
    echo      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ & echo.


    FOR /F "tokens=1" %%X in ("%pid%") do (
        set pid=%%X
    )

    FOR /F "tokens=2" %%X in ("%hex%") do (
        set hex=%%X
    )

    echo         *.... STOP_FLAG: [ %STOP_FLAG% ]
    echo         *.......... PID: [ %pid%   ]
    echo         *.......... HEX: [ %hex%     ] &echo.

:: CLOSE HANDLE (suppressed output) ::
    handle64 -p %pid% -c %hex% -y -nobanner >nul &echo.


    FOR /F %%I in ('handle64 -p D2R.exe -a "DiabloII Check For Other Instances" -nobanner') do set STOP_FLAG=%%I & echo.

    if %STOP_FLAG% == No (
	echo     #######################################
        echo                 ~ Handle Closed ~
	echo     #######################################
	echo. &echo.
        goto :DONE

    ) else (

:: Theoretically this error should never be trigged, since admin privilages are taken care of at beginning of script. ::
        echo!!!!.... ERROR: RE-RUN PROGRAM AS ADMINISTRATOR 
    )
)


:DONE
    timeout /t 2 >nul

~~ The End ~~

20 Likes

Thx for the post. Couple more user-friendly notes

  1. Now launch the process explorer application as administrator

  2. Single click D2R.exe to highlight it press Ctrl + L to enable the lower pane and observe the list below that pops up

2 Likes

I dunno, i have tried this a few times, exactly. And for some odd reason, my other account shows “playing Now” , even after closing handle.

EDIT: Actually, does work, but can fail to work, redid a couple times, Cheers.

when i first tried this a couple weeks ago, it worked perfectly for a couple hours. the following day it would keep crashing one or both instances every 15 mins so i went back to using chrome remote deskptop + 2nd PC :frowning:

is this bannable? since you are ending a process that checks for instances?

1 Like

No clue… but hey, given the garbage state this game game has been in (ok, i mean… its better…) for, well… since its release, and with no apparent change at all for the better any time in the near future. If i get banned for being someone that gave them a few extra bucks for each of these copies in a time, that clearly, they need the money for lawyers, so be it.

Seriously, this game is 100 time worse than og could be in an over all state, and at this point, meh, well , i said it at release. I just won’t be surprised at all if this is it. It is what it is. I will just go back to the og. Might be a little less pretty, but it functions much much better

IMHO, blizzard is idiots for not allowing us a simpler way to multi launch, for the few of us that will give them extra money for a few copies. Anyways, pffft whatever.

1 Like

Are you some kind of a genius or somethin’ ??

xD thanks mon.

I read the terms of service and it specifically states that multi windows is permitted, BUT also goes on to state that manipulating the software is against the rules. So IDK to be honest.

It wouldn’t make a lot of sense for them to ban people, because the consumer purchased two products. Why would running 2 products on one pc be any different than running 2 products on pc/laptop or w/e.
Anyways, they would have to ban a lot of their customers, which I personally don’t think they are going to want to do. If anything they will make it easier to do it from the bnet application (aka remove the handle completely). Not sure why they put it in to begin with. Most likely due to performance issues caused during their testing. Just a guess. Works perfectly fine on my PC though.

4 Likes

Blizzard allows D3 to have multiple accounts played at the same time on one pc.

Why in the heck does D3R not allow the same?

Come on Blizzard allow multiple copies of D2R to easily run on one pc.

Thank you.
Also

[Classic] Same shared stash as LoD. Please let this happen as well Blizzard.

Thanks.

6 Likes

also wont spend money until this is possible without senseless stuff like op described

  • streamers (playing on same realm) get shown 20+ public games on normal while im sitting here seeing 1 game (i can join the games he is seeing when i type in tho, so just show me aswell blizzard)
2 Likes

Just build another PC.

Mine says “Folder doesnt contain the correct version”. I click OK and log in to 2nd account, but then it says Games already playing

I Got the game version fixed. But still shows me as already playing the game

1 Like

I’m using another pc wiht Windows Desktop Manager. Actually, this is only one method. Need to wait an upgrade of Sandboxie, the one to solve this “problem” :slight_smile:

1 Like

This also happened to me for a couple days then stopped, but I was trying to run 3 windows. With 2 it has been solid. It may help to close the handle on the second instance. This seems to help keep both windows alive longer. Totally anecdotal though.

1 Like

Same, not sure what now

Can you share the contents of your bat file? Google Drive has flagged your zip so only the owner can download it to examine.

Weirdness, idk what they think is a virus. Probably cuz the .exe is packaged with the handle.exe file I’m guessing. This must be ran with handle64.exe in same directory as the batch script file.
Here’s a link containing the .bat and handle64.exe:
drive.google.com/drive/folders/1ycE0izXis0ynD1kUv0TLjREdT5rr3RxW?usp=sharing

And here’s the code for the .bat file:

@echo off
setlocal EnableDelayedExpansion

:: RAN AS ADMINISTRATOR? CHECK/FIX IF NOT ::
:-------------------------------------
REM  --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"

REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
    echo. &echo. &echo. &echo.
    echo    Run as admin to close handle.
    echo      Requesting privilages.... &echo.
    goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"

    "%temp%\getadmin.vbs"
    exit /B

:gotAdmin
    if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
    pushd "%CD%"
    CD /D "%~dp0"
:--------------------------------------



FOR /F %%I in ('handle64 -p D2R.exe -a "DiabloII Check For Other Instances" -nobanner') do set STOP_FLAG=%%I


:: PRIMARY SCRIPT ::
:while

    if %STOP_FLAG% == No (
	mode con cols=51 lines=9 >nul
	echo. & echo. & echo. 
	echo       #######################################
        echo                 ~ NO OPEN HANDLES ~          
	echo       #######################################
	echo. &echo.
        goto :DONE
    )

:: SET CONSOLE WINDOW SIZE ::
mode con cols=51 lines=16 >nul

:: SET PID/HEX VALUES FOR PROCESS HANDLE ::
    FOR /F "tokens=2,3 delims=:" %%A in ('handle64 -p D2R.exe -a ^"DiabloII Check For Other Instances^"') do (
        set pid=%%A
        set hex=%%B
    )


:: DEBUGGING OUTPUT ::
    echo      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    echo                [ DEBUG INFO ] 
    echo      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ & echo.


    FOR /F "tokens=1" %%X in ("%pid%") do (
        set pid=%%X
    )

    FOR /F "tokens=2" %%X in ("%hex%") do (
        set hex=%%X
    )

    echo         *.... STOP_FLAG: [ %STOP_FLAG% ]
    echo         *.......... PID: [ %pid%   ]
    echo         *.......... HEX: [ %hex%     ] &echo.

:: CLOSE HANDLE (suppressed output) ::
    handle64 -p %pid% -c %hex% -y -nobanner >nul &echo.


    FOR /F %%I in ('handle64 -p D2R.exe -a "DiabloII Check For Other Instances" -nobanner') do set STOP_FLAG=%%I & echo.

    if %STOP_FLAG% == No (
	echo     #######################################
        echo                 ~ Handle Closed ~
	echo     #######################################
	echo. &echo.
        goto :DONE

    ) else (

:: Theoretically this error should never be trigged, since admin privilages are taken care of at beginning of script. ::
        echo!!!!.... ERROR: RE-RUN PROGRAM AS ADMINISTRATOR 
    )
)


:DONE
    timeout /t 2 >nul

i identify as 2 people so i have the right to play 2 instances of any game

6 Likes

I identify as trinary

1 Like

alternative tutorial:

#1 get 2 licences and 2 accounts of the game
#2 install at least one instance of the game.
#3 copy the game’s folder elsewhere.
#4 make a shortcut to D2R.exe for each of the game executables ( one installed and one copied)
#5 right click each D2R.exe shortcut and go to properties, and ad a “-launch” without the quotes as a startup parameter. Google it if you don’t know how to do it properly.
#6 open battle.net app and login with first account. set the app to not login with last logged user, and to shutdown itself after launching a game.
#7 start the game with pressing play. the app should close itself and the game should launch.
#8 alt tab of the game launch battle.nt app choose to login with second account you have D2R in. login and close. next start the game from the second shortcut. and voila…

Please make sure your machinecan handle more than one copy of D2R at a time… a.k.a 32GB of ram and 8GB of vram would be a bare minimum to play two instances on low details…

1 Like