close windows control panel applet?

Hi all you great peoples. I’m really stuck on this one…
I am running a windows batch file (.bat) from within xojo, which changes the user’s desktop theme. Trouble is it opens the “personalize” control panel applet as well.
I can find a ton of info on opening the cpl applet from command line and from xojo, but I’ve found nothing in either case about how to close the applet.
Whether I use xojo commands or “dos” commands doesn’t matter to me…I just want that control panel applet to disappear.

Any help on this would be greatly appreciated.

For reference purposes, here is the command I am using in my batch file:

rundll32.exe %SystemRoot%\\system32\\shell32.dll,Control_RunDLL %SystemRoot%\\system32\\desk.cpl desk,@Themes /Action:OpenTheme /file:"C:\\Windows\\Resources\\Ease of Access Themes\\classic.theme"

I assume the applet is a Window? A window has an handle. If you obtain the handle you can close it (I suppose).
Take a look here.

[quote=142565:@Alexander van der Linden]I assume the applet is a Window? A window has an handle. If you obtain the handle you can close it (I suppose).
Take a look here.[/quote]
Thanks Alexander…will see if I can figure that out. :wink: