Run multiple D2R instances
The following method will let you run two Diablo 2 Resurrected instances at once on the same machine. No need to struggle with a sandbox or a virtual machine, the trick is to close a handle within the game (D2R.exe) process. This handle is the one that checks if any D2R instances already exists. If closed, another D2R.exe process will be able to start.
Prerequisites
- Two or more Battle.net accounts with D2R
Setup and configure D2R/bnet
- Install D2R (default dir will be "C:\Program Files (x86)\Diablo II Resurrected")
- Duplicate the D2R directory, name it something like "C:\Program Files (x86)\Diablo II Resurrected_alt"
- In the Battle.net launcher, go to the launcher's settings :
- Set Battle.net client to exit on game launch
- Uncheck "Keep me logged in"
- (optional) Create two shortcuts to your Desktop :
- One named "D2R" pointing to "C:\Program Files (x86)\Diablo II Resurrected\Diablo II Resurrected Launcher.exe"
- The second "D2R_alt" to "C:\Program Files (x86)\Diablo II Resurrected_alt\Diablo II Resurrected Launcher.exe"
Setup the multi-instances hack
- Create a new folder in D2R first directory, name it something like "MultiInstances"
- Download Handle Windows process utility (handle64.exe) from Microsoft here, and place it in this directory
- In the same dir, create a new Powershell script, name it like "d2r_stophandles.ps1"
- Copy the following instructions in it and save it
# Run multiples D2R clients
# This script closes Diablo 2 Resurrected following thread handles in order to run multiples D2R clients on the same computer :
# - Event "DiabloII Check For Other Instances"
# - Section "windows_shell_global_counters"
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
{
Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit
}
& "$PSScriptRoot\handle64.exe" -accepteula -a -p D2R.exe > $PSScriptRoot\d2r_handles.txt
$proc_id_populated = ""
$handle_id_populated = ""
foreach($line in Get-Content $PSScriptRoot\d2r_handles.txt)
{
$proc_id = $line | Select-String -Pattern '^D2R.exe pid\: (?<g1>.+) ' | %{$_.Matches.Groups[1].value}
if ($proc_id)
{
$proc_id_populated = $proc_id
}
$handle_id = $line | Select-String -Pattern '^(?<g2>.+): Event.*DiabloII Check For Other Instances' | %{$_.Matches.Groups[1].value}
if ($handle_id)
{
$handle_id_populated = $handle_id.Trim()
& "$PSScriptRoot\handle64.exe" -accepteula -c $handle_id_populated -p $proc_id_populated -y
}
}
How to use
- Launch the first D2R instance normally through the launcher
- Once in-game, run
d2r_stophandles.ps1as admin - Launch the second instance using the D2R_alt shortcut
- Log in with your second Battle.net account
- Enjoy