How to stop rundll32.exe process while running a application in windows operating system

  32bit-64bit, batch-file, rundll32, windows

I have a video game installed in windows 7. The executable file is a 32 bit application. When I double click to launch it, I notice a process named rundll32.exe starts running taking up 80% of CPU usage for no reason. If I launch it again for the second time, the game opens. However for some reason the game won’t start if there isn’t a process named rundll32.exe running. Even if I end the process named rundll32.exe through task manager, running the game executable file will again start the rundll32.exe process. However I found a fix for this problem by pressing Alt + Tab while the game is running, opening task manager and ending the process. Through this way I can play the game without rundll32.exe taking 80% of my cpu usage.

But still not everyone would want to do the same thing again and again when running the game. I tried to type a batch code that would automate the process but sadly it doesn’t work at all times! (It works for a few times then the next time it either doesn’t open the game file or doesn’t close the rundll32.exe process)

Here’s the batch code:

@echo off
START game.EXE /WAIT

tasklist /fi "rundll32.exe" | find ":"  > nul
if errorlevel 1 START game.EXE
                      taskkill /IM "rundll32.exe" /F

Can anyone give me a proper batch code that would first open the game.EXE, then check if a process named rundll32.exe is running, then start the game.EXE again and finally it should end the rundll32.exe process after the game.EXE is launched for the second time.

(Side note: I am not good at batch programming)

Source: Windows Questions

LEAVE A COMMENT