windows-quiet-hours | Checks if Windows 10 quiet hours | Command Line Interface library
kandi X-RAY | windows-quiet-hours Summary
kandi X-RAY | windows-quiet-hours Summary
Checks if Windows 10 quiet hours are active
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Check to see if the current hour is quiet .
windows-quiet-hours Key Features
windows-quiet-hours Examples and Code Snippets
Community Discussions
Trending Discussions on windows-quiet-hours
QUESTION
I'd like to change the presence state in an App automatically to DND when Focus Assist is turned on.
So two questions basically:
Is it possible to check Focus Assist state through e.g. Windows 10 SDK?
There is a similar question for Quiet Hours in Windows 8 here: Get windows Quiet hours from Win32 or C# API, though it's not clear whether it also still applies to "Focus Assist" since this is no longer a true or false value. Quiet hours had only ON/OFF state while Focus Assist can be OFF/PRIORITY/ALARMS.
The more interesting question though, which is not answered in the post mentioned above: is there an event I could register to, to get notified about state changes?
The goal is to get notified right away, when Focus Assist status changes in order to not have to query the registry on a regular basis.
ANSWER
Answered 2018-Nov-21 at 11:53As far as I know there is no officially documented way of getting the Focus assist status.
It still can be accessed by querying the WNF State of the feature, although this is completely undocumented and not officially supported.
The various states for WNF Data have been reverse engineered, so the one for Focus Assist is WNF_SHEL_QUIETHOURS_ACTIVE_PROFILE_CHANGED
.
The C++ sample below shows how to get the state of Focus Assist feature (mostly off
, priority_only
and alarm_only
).
Once again, be wary that this is not officially supported by Microsoft:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install windows-quiet-hours
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page