Many old games (Starcraft, Diablo II, Diablo, Age of Kings...) have huge problems displaying colors correctly on Windows 7. For Starcraft, I have succeeded to fix this using:

  1. Opening the screen resolution settings dialog (sometimes works)
  2. Killing explorer.exe (always works)
  3. Using DirectDraw color fix (sometimes works)

For Diablo II, only the 2) works for me. So I have written following batch file:

rem Kill explorer.exe
taskkill /IM explorer.exe /F
rem Run the game
"Diablo II.exe"
rem After game is over, resume explorer.exe
rem explorer.exe

The problem is, that the actual process for the game is Game.exe and the Diablo II.exe exits immediately - so the explorer immediately restarts.

Do you have any idea, how to automate the resuming of explorer.exe after I close Diablo II?

  • Have you tried setting the color mode on the executable or shortcut? – murgatroid99 Oct 27 '14 at 22:10
  • Are you running the latest version of Diablo II? I know the version that comes off the discs won't even run on Windows 7 due to compatibility issues, but (presumably) the latest version works just fine after its been patched -- I haven't gotten those dreadful color errors in ages. – Kyle Baran Oct 27 '14 at 22:20
  • I'm running v1.12. Keep in mind that the fact that you don't get the color errors doesn't mean anything. According to my experience, this problem is quite system-specific and almost every computer has it different. – Tomáš Zato Oct 27 '14 at 22:26
  • Yes, I have used compatibility settings. They have no effect on game. – Tomáš Zato Oct 27 '14 at 22:26
up vote 3 down vote accepted

You can write a loop that checks if a specific process (e.g. "Game.exe") is running and repeats checking until it is closed. The code could look like this.

rem Kill explorer.exe
taskkill /IM explorer.exe /F
"Diablo II.exe"
rem Wait 5 seconds for Game.exe to start. Must be tweaked.
timeout /T 5 /NOBREAK > NUL
:whilegameruns
rem Check if Game.exe is running
tasklist /FI "IMAGENAME eq Game.exe" 2>NUL | find /I /N 

"Game.exe">NUL
if "%ERRORLEVEL%"=="0" (
    rem Sleep for 5 seconds
    timeout /T 5 /NOBREAK > NUL
    goto :whilegameruns
)
rem Run explorer.exe afterwards
"explorer.exe"

As I do now have Diablo 2 handy this code is not tested properly. Depending on the flavor of Windows the commands might need to be changed slightly.

  • What's that >NUL all around? – Tomáš Zato Oct 27 '14 at 23:47
  • 2
    SHELL redirected to NUL device suppresses MS-DOS messages. – nonterrorist Oct 28 '14 at 1:18

Particularly for Diablo 2 I recommend installing a Glide Wrapper (particularly the one by Sven Labusch, though it is only intended to be used with Diablo 2), configure the game to use Glide and configure the wrapper to run in desktop resolution at 32bit color depth. The only thing left to configure then, is to fall back to Aero Basic mode while the game runs.

There may be similar workarounds for other games (for example there are newer OpenGL and Direct3D drivers for Unreal Tournament that fix these kinds of issues), so trying to find these may improve your game experience a lot more than hacking around those side effects.

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.