0

So i'm making a simple batch file that switches themes upon request. When entered the name of a theme located in the same directory, it runs it using start then it opens Control panel to switch theme. It should wait 10 seconds and Taskkill it by the window name (NOTE: im using a Dutch version og windows 7 home: this is basicly the path used as windows title Configuratiescherm\Vormgeving en persoonlijke instellingen\Persoonlijke instellingen ) But after ten seconds, it doesnt kill it, it only output's the following text Info: er zijn geen taken met de opgegeven criteria actief. what translates to Info: there are no processes found with that title Help please!

Mr. Mocha
  • 43
  • 1
  • 10
  • That is because windows configuration screen is a subprocess of explorer.exe. If you open up your task manager while the configuration screen is open, you should see that one of the apps at the top is called `Windows Verkenner`. If you click the little arrow to the left of it it should show: `Configuratiescherm`. – Dennis van Gils Dec 03 '15 at 20:35

2 Answers2

0

There is no real good way to taskkill control panel only. The only one I can think of is killing and restarting explorer.exe using

taskkill /f /im explorer.exe
start explorer.exe
Dennis van Gils
  • 3,487
  • 2
  • 14
  • 35
-1

use these commands

taskkill /f /im explorer.exe

start explorer.exe