Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Basically, I'm using a software called Xpadder that lets me control my computer with a game pad. Problem is, when I start a game I need Xpadder to end. So I typed this batch file

tasklist /FI "IMAGENAME eq Xpadder.exe" 2>NUL | find /I /N "Xpadder.exe">NUL
if "%ERRORLEVEL%"=="0" (
TASKKILL /F /IM "Xpadder.exe"

Works a charm. Problem is though, it minimises the game when it runs! Is there anyway I can avoid this?

share|improve this question

You could create a shortcut to your batch-script, right-click on it and open the properties. There you'll find a drop-down where you can choose to run the script minimised.

Another way to do it would be to make the script start itself using the min parameter:

@echo off
pushd "%~dp0"
if "%1"=="done" goto runtime
for %%I in (%0) do start "" /min %%~sI done

title Minimised
echo Code goes here
exit /b

I used %%~sI to run the start command with 8.3 names to prevent troubles with whitespace in path or file names.

share|improve this answer

Your Answer


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.