title: How to close the personalization window after specified time via command prompt
body: <p>I have some vbs code that will automatically change my windows theme via cmd as well as close it after the operation completes. The personalization window opens, Windows changes the theme, and then the personalization window closes. The problem is, sometimes the window doesn't close after changing the theme and I'm wondering why. Also, is there a one-liner code in cmd (or vbs that can execute through cmd) that just closes the personalization window? Thanks in advance for your help! My code used is as follows:</p>
  
  <pre><code>Set WshShell = WScript.CreateObject("WScript.Shell")
  
  WshShell.Run "rundll32.exe %SystemRoot%\system32\shell32.dll,Control_RunDLL %SystemRoot%\system32\desk.cpl desk,@Themes /Action:OpenTheme /file:""C:\Windows\Resources\Ease of Access Themes\basic.theme"""
  
  Wscript.Sleep 1600
  WshShell.AppActivate("Desktop Properties")
  WshShell.Sendkeys "%FC"
  WshShell.Sendkeys "{F4}"
  </code></pre>