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!
Asked
Active
Viewed 1,485 times
0

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 Answers
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
-
I was also thinking about this, but i definitly dont want to mess with explorer.exe still, thanks a lot – Mr. Mocha Dec 05 '15 at 15:41
-
1Btw, if you ever find yourself unable to start explorer.exe, you can use Ctrl+Shift+Del, click file, start new task, explorer.exe – Dennis van Gils Dec 05 '15 at 15:59
-
I know. I once accidently killef explorer.exe while clearing memory :) – Mr. Mocha Dec 05 '15 at 16:07