I couldn't get the AutoHotKey script from Gray to work for me on Win 8.1, so I made one.
Put this in a .ahk file
Windows 8.1 version:
Run, %SystemRoot%\System32\rundll32.exe shell32.dll`,Options_RunDLL 1
WinWait, Taskbar and Navigation properties,
IfWinNotActive, Taskbar and Navigation properties, , WinActivate, Taskbar and Navigation properties,
WinWaitActive, Taskbar and Navigation properties,
Windows 10 version (tested on version 10.0.17134.523 1/13/2019):
#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
WinWaitActive, Settings, , 3
MsgBox, WinWait timed out.
CoordMode, Pixel, Client
WinGetPos, X, Y, Width, Height
;OutputDebug, Width Height %Width% %Height%
; Wait for Settings UI to load
if (Width <= 735)
;Close the settings UI
(You may need to adjust the sleep durations if they are not long enough on your system. There is probably a better way to detect when the UI has loaded besides sleeping, but I couldn't figure it out. I couldn't detect the text box control in the UI. I tried to detect a color pattern but the end user has control of the color scheme.)