Jump to content

W7 Action Center Settings - refresh without logoff?


Recommended Posts

Hi folks.

I'v written a little script that configures the Windows 7 Action Center Settings. However, when I run the script, these settings only take effect once the user logs off and back on again. If you perform the same steps manually (i.e. via opening Control Panel and then going into the Action Center), these settings take effect immediately.

I assume there is something that forces the refresh and update of these settings when you perform them manually via the Control Panel and that is what I'm trying to find a way of doing within AutoIt. So, is it possible to make these settings 'take' without having to log off and back on again?

Here's the script:

Run("explorer shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\0\::{BB64F8A7-BEE7-4E1A-AB8D-7D8273F7FDB6}\Settings")
WinWait("Action Center", "Change Action Center settings")
Sleep(100)
WinActivate("Action Center", "Change Action Center settings")
ControlCommand("Action Center", "Change Action Center settings", "[CLASS:Button; INSTANCE:1]", "UnCheck", "")
ControlCommand("Action Center", "Change Action Center settings", "[CLASS:Button; INSTANCE:2]", "UnCheck", "")
ControlCommand("Action Center", "Change Action Center settings", "[CLASS:Button; INSTANCE:3]", "UnCheck", "")
ControlCommand("Action Center", "Change Action Center settings", "[CLASS:Button; INSTANCE:4]", "UnCheck", "")
ControlCommand("Action Center", "Change Action Center settings", "[CLASS:Button; INSTANCE:5]", "UnCheck", "")
ControlCommand("Action Center", "Change Action Center settings", "[CLASS:Button; INSTANCE:6]", "UnCheck", "")
ControlCommand("Action Center", "Change Action Center settings", "[CLASS:Button; INSTANCE:7]", "UnCheck", "")
ControlCommand("Action Center", "Change Action Center settings", "[CLASS:Button; INSTANCE:8]", "UnCheck", "")
Sleep(50)
ControlClick("Action Center", "Change Action Center settings", "[CLASS:Button; INSTANCE:10]")
WinWait("Action Center")
Sleep(50)
WinClose("Action Center")
Run(@ComSpec & " /c " & 'shutdown /t 8 /f /l /c "LOG-OFF REQUIRED. Configuration in progress. Computer ready to use at next login."')

Any ideas of suggestions on how I could work this bit out, are hugely appreciated!

Many thanks,

Gregor

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...