Jump to content

Script to automate MSCONFIG


DougR
 Share

Recommended Posts

Hi all,

I am looking to find a script that will do a simple task. I need to open MSCONFIG and configure a few things automatically. Here they are:

Open Msconfig.exe

Navigate to the 3rd tab (services)

Check the "hide all microsoft services" button

click "disable all"

Navigate to the 4th tab (startup)

click "disable all"

click OK to close the box.

Seems like a very simple task to do. Does anyone know of a script that is already written to do this, or where I can find one? I really cand do a screen recording, because of the differences in screen resolutions.

Thanks!

Link to comment
Share on other sites

find the control handles to the buttons and tabs

Like this:

#include <GuiTab.au3>
;

Run("msconfig.exe")
WinWait("System Configuration")
Sleep(500)
$hSysConfig = WinGetHandle("System Configuration")
$hTab = ControlGetHandle($hSysConfig, "", "SysTabControl321")


;Click services
_GUICtrlTab_ClickTab($hTab, 2)
Sleep(50)

;Check the hide
ControlCommand($hSysConfig, "", "Button3", "Check")
Sleep(50)

;Disable all
ControlClick($hSysConfig, "", "Button2")
Sleep(50)

;Click startup
_GUICtrlTab_ClickTab($hTab, 3)
Sleep(50)

;Disable all
ControlClick($hSysConfig, "", "Button2")
Sleep(50)

; Apply
ControlClick($hSysConfig, "", "Button22")
Sleep(50)
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...