SystemUpdateManager.TrySetUserActiveHours(TimeSpan, TimeSpan) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Try to set the user defined Active Hours during which automatic reboots for update will not be allowed.
public:
static bool TrySetUserActiveHours(TimeSpan start, TimeSpan end);
static bool TrySetUserActiveHours(TimeSpan const& start, TimeSpan const& end);
public static bool TrySetUserActiveHours(System.TimeSpan start, System.TimeSpan end);
function trySetUserActiveHours(start, end)
Public Shared Function TrySetUserActiveHours (start As TimeSpan, end As TimeSpan) As Boolean
Parameters
Returns
Boolean
bool
Returns true if active hours were set. Returns false otherwise.
Remarks
The maximum number of hours allowed between start time and end time can be retrieved using Windows.System.Update.SystemUpdateManager.UserActiveHoursMax