The following code is used to change my Windows theme:
Set WshShell = WScript.CreateObject("WScript.Shell")
sLocalAppDataPath = WshShell.ExpandEnvironmentStrings("%localappdata%")
WshShell.Exec "rundll32.exe %SystemRoot%\system32\shell32.dll,Control_RunDLL %SystemRoot%\system32\desk.cpl desk,@Themes /Action:OpenTheme /file:""" & sLocalAppDataPath & "\Microsoft\Windows\Themes\Custom.theme"""
After it is finished running, the Peronalization window stays open. Is it possible to run a file without even opening the window to begin with? I know how to close it using sendkeys, but I don't want to do this. Any help is much appreciated!