1.

Solve : need help makeing a batch file to play older games.?

Answer»

Hello all,

    I am trying to make a batch file to play starcraft 1 on my computer's Windows 7 ultimate x64bit OS.

The problem with this particular game is that Explorer.exe conflicts with starcraft causing pixelation, terrible discoloring, and crashes.  I have solved the problem by ending explorer.exe via task manager.  Also for some reason windows 7 makes me run the game twice inorder to bring it to focus.  this causes mass system rescourses to be used and causes my CPU to over heat.  It is harder on my computer to play a game from the 90's that it is to play Crysis 3 for what thats worth.  This problem is also remedied via task Manager by ending the "rundll32.exe" process.  The game works perfect after that.  I have a batch file made to deal with discoloration  it goes like this:

echo off
taskkill /f /IM explorer.exe
start /wait StarCraft.exe
start C:\Windows\explorer.exe

What I need to add to this is a way to killtask rundll32.exe.  Here is the kicker though,  I need this batch file to run starcraft twice and THEN kill rundll in order to play the game properly.  I am just now starting to learn working with batch files, and I would appreciate any help on this.  the game plan is this:

Echo off
Kill explorer
Run Starcraft
Run Starcraft (I will more that likely need a timer to run starcraft a second time like 5 seconds to ensure the first loads)
Kill rundll32 (which will in turn automatically close the first starcraft so it dosnt eat my system rescourses.)
Run Explorer.exe (AFTER I kill the game so I can have my desktop back instead of having to run explorer.exe via task manager)

so yeah  A timer to load starcraft.exe a 2nd time.  and possibly a timer to close rundll32.exe if thats what you guys think is best.  Thanks in advance for any and all help guys.  ^_^  If you need additional information,  please let me know,  but I dont think that my computer specs will help in this situation other than my OS.run:

Code: [Select]regsvr32 /u C:\windows\system32\GameUX.dll
regsvr32 /u C:\windows\sysWOW64\GameUX.dll

This should fix the issue with RunDLL32. Note that this component is used by Games Explorer and could even be required by the shortcuts of some games. From my testing, running the Games Explorer Applet re-registers these components.


GameUX.dll is supposed to be a game manager, and 'injects' itself into the launch process of any DX game. However, the problem is that, if there is either no outbound connection or you have a firewall installed, it will actually hang in an infinite loop waiting for a response from "http://www.microsoft.com/WindowsMedia/Services/2003/10/10/common" and "http://www.microsoft.com/WindowsMedia/Services/2003/10/10/games".

The computer that I am making the Batch file for is not currently connected to the internet.   As there will be no in/outbound CONNECTIONS, will the .dll's you listed will hang in an infinite loop?  If so,  is there any other remedy you can think of to prevent the need for two instances of the same game to run in win7 due to rundll32.exe?What if I modify "block service providers" to where it can not send to microsoft, will that prevent an infinite loop? QUOTE from: Makomea on April 11, 2013, 04:48:09 AM

The computer that I am making the Batch file for is not currently connected to the internet.
Then it's exactly the same as the computer I diagnosed this issue with.
Quote
As there will be no in/outbound connections
There will. The functionality will be the same. It will still try to connect, and it will still fail waiting for a response.

Quote
will the .dll's you listed will hang in an infinite loop?
Yes

Quote
If so,  is there any other remedy you can think of to prevent the need for two instances of the same game to run in win7 due to rundll32.exe?
The infinite loop is caused by the dlls. Unregistering them prevents them from causing this problem.run:

Code: [Select]

regsvr32 /u C:\windows\system32\GameUX.dll
regsvr32 /u C:\windows\sysWOW64\GameUX.dll


Do I paste these into the batch file or do I run them?Either way works. I just ran them at the command line in my situation, but it ought to have the same effect.

In my case I don't have Starcraft so this is mostly guesswork based on uncannily similar problems I had with a good number of games when my desktop machine didn't have an Internet Connection. Some of the games I recall having the problem with are from the same era as StarCraft (I BELIEVE the oldest was the Original Command & Conquer), so hopefully your issue is caused by the same thing.

Either way, if you ever want to re-register Games Explorer, I think it does so when you launch the Games Explorer, or you can run the same commands but remove the /u switch.Hey,  thanks for the help bub  ^_^  I was on auto pilot last night.  Sleep deprivation  and SB DOUBLE shots wouldn't let me accomplish simple tasks.  Anyways,  I ran the codes via CMDp and they unregistered as you said.  I ran Starcraft as usual,  but WIN7 is still forcing me to use dual instances of the game before it can be brought to focus.  I have installed a couple oldie but goldie games like Warlords battlecry III,  C&D,  Warcraft III,  and still the same deal,  all dual instances and I have to Alt-Tab to task manager to kill Rundll32.exe so it will close the first instance of the game and not eat my CPU.  I tell you bub,  I can have Starcraft II,  Dawn of War II,  and TES: Skyrim running at the same time,  no lag to each other and all three games do not produce over 45 degrees Celsius.  This is on my AMD Phenom II 965 BE on STOCK cooler. (cherri wewt!)  But if I got to run a single game game from the 90's my CPU is hitting 60c on loading the game,  and 65-70 while playing the game unless I kill rundll32.exe.  Even then it is still running in the 50's for these old games.  If you can think of a for starcraft as said originally,  the .bat is a bit more complicated as it needs to both end explorer and kill rundll32,  but for the other old games,  I need only kill rundll32 via batch file just to make my gaming a bit easier.  So if you know a way to make a batch file that can accomplish this task,  I would be very grateful for the information.  ^_^  Either way,  I do really appreciate all the advice.  I will know what to do in the future if I run into the infinite loop issue in the future.You could always figure out what the rundll32.exe is for, hopefully it could give a clue as to an underlying CAUSE.

In Task Manager, you can add the "Command Line" column; this column on rundll32.exe will tell you/us exactly what dll is involved. In my investigations of my issue, it was GameUX.dll; but if you unregistered that it shouldn't be appearing, so it must be something else. Also double check the path of the rundll32.exe file, and make sure it is in C:\Windows\System32 or C:\Windows\SysWOW64.

You can kill rundll32.exe in a batch file the same way you kill explorer. The problem is it probably doesn't appear until after you've launched it, and by that time the batch is no longer in control (I imagine you have it wait for the program to exit so that you can launch explorer again). I suppose you could  delay using ping.

Either way I imagine there is an underlying cause, and the command line of the pegging rundll32 process can be useful to find out why.


Discussion

No Comment Found