Search code examples
windowsbatch-filethemestaskkill

batch - windows control panel taskkill not working


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!


Solution

  • 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