Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a game which doesn't look perfect as long as explorer.exe is running. Currently the process is to start the game, kill explorer.exe from the task manager then once the game is done restart explorer from the task manager. I was wondering if there was some way to set up the shortcut for the game to do this. I know you can execute commands from within the shortcut's properties, but I don't know how.

Just to restate, I want to have the shortcut kill explorer.exe, start the game, then restart explorer.exe once the game is finished.

I am running Windows 7 Professional 64-bit.

share|improve this question
    
This isn't a good solution to the core issue at hand. Killing and restarting explorer.exe can lead to other issues. –  KronoS Jul 14 '12 at 17:34
add comment

4 Answers

up vote 4 down vote accepted

I've had a similar problem with a game I have. You can easily create a short batch script that will kill and restartexplorer.exe and then run the batch script whne you want to start the game. Here's the script startgame.bat:

@echo off
taskkill /f /IM explorer.exe
game.exe
Start explorer.exe

Obviously replace game.exe with your exe. Place the batch file next to your game exe and run it instead.

share|improve this answer
    
And I would link to the batch script in the shortcut for the game? –  indyK1ng Aug 21 '10 at 17:36
    
Yep, you would create a shortcut to this batch scrip to replace your current shortcut. –  heavyd Aug 21 '10 at 21:51
add comment

I've had similar problems with Diablo 2 on Windows 7. Got it fixed by setting the compatibility mode to Windows XP. Right click on the exe -> properties -> click the compatibility tab and from there you can enable the compatibility mode and choose which OS is most suitable for the program. This have saved me alot of times.

I was actually searching for the batch code to end explorer while executing a certain program. GTA IV is totally unplayable on my computer while explorer is running heh

share|improve this answer
add comment

if explorer dont start after exit game try:

taskkill /f /IM explorer.exe

game.exe

C:\windows\explorer.exe

///info to last line: or yours path to windows folder

share|improve this answer
add comment

You can set up a batch file to do this.

Open up notepad, and after you are done, save it and name it something like "start_game.bat" and change the file type to "all files". This step makes sure the file extension gets changed to .bat

@ECHO OFF

"C:\path to your game\game.exe"

TASKKILL /F /IM explorer.exe

:taskcheck

TASKLIST /FI "IMAGENAME eq game.exe" /FI "STATUS e q running"

GOTO loop_check

:loop_check

TASKLIST /FI "IMAGENAME eq game.exe" 2>NUL | find /I /N "game.exe">NUL

IF "%ERRORLEVEL%"=="0" GOTO start_explorer ELSE GOTO loop_check

:start_explorer

"C:\windows\explorer.exe"

PAUSE

I haven't tested this on my own machine, so it may need minor adjustments.

Basically, what this (should) do is start your game's exe file, kill the explorer.exe task, and then loop to check to see if your game's exe is running. If it is, check it again. If it isn't, start explorer.exe

Make sure to change the references to "game.exe" to whatever the executable of your game is.

Out of curiosity, what game is it that you're trying to run?

share|improve this answer
    
Command and Conquer. It runs fine, but Explorer seems to be overlaying some weird colors for some reason. –  indyK1ng Aug 21 '10 at 18:16
    
I saw mention of a 3rd-party mod that may address the color issue: purefaction.org Though, I'm not sure if you would be able to play multiplayer with gamers running without the mod. Also, I stumbled across this: sevenforums.com/gaming/… –  Force Flow Aug 21 '10 at 20:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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