def get_wu_settings():
 ret = {}
 day = ['Every Day', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
 pythoncom.CoInitialize()
 obj_au = win32com.client.Dispatch('Microsoft.Update.AutoUpdate')
 obj_au_settings = obj_au.Settings
 ret['Featured Updates'] = obj_au_settings.FeaturedUpdatesEnabled
 ret['Group Policy Required'] = obj_au_settings.Required
 ret['Microsoft Update'] = _get_msupdate_status()
 ret['Needs Reboot'] = get_needs_reboot()
 ret['Non Admins Elevated'] = obj_au_settings.NonAdministratorsElevated
 ret['Notification Level'] = obj_au_settings.NotificationLevel
 ret['Read Only'] = obj_au_settings.ReadOnly
 ret['Recommended Updates'] = obj_au_settings.IncludeRecommendedUpdates
 ret['Scheduled Day'] = day[obj_au_settings.ScheduledInstallationDay]
 if (obj_au_settings.ScheduledInstallationTime < 10):
  ret['Scheduled Time'] = '0{0}:00'.format(obj_au_settings.ScheduledInstallationTime)
 else:
  ret['Scheduled Time'] = '{0}:00'.format(obj_au_settings.ScheduledInstallationTime)
 return ret

def get_wu_settings ( ) : ret = { } day = [ 'Every Day' , 'Sunday' , 'Monday' , 'Tuesday' , 'Wednesday' , 'Thursday' , 'Friday' , 'Saturday' ] pythoncom . CoInitialize ( ) obj_au = win32com . client . Dispatch ( 'Microsoft.Update.AutoUpdate' ) obj_au_settings = obj_au . Settings ret [ 'Featured Updates' ] = obj_au_settings . FeaturedUpdatesEnabled ret [ 'Group Policy Required' ] = obj_au_settings . Required ret [ 'Microsoft Update' ] = _get_msupdate_status ( ) ret [ 'Needs Reboot' ] = get_needs_reboot ( ) ret [ 'Non Admins Elevated' ] = obj_au_settings . NonAdministratorsElevated ret [ 'Notification Level' ] = obj_au_settings . NotificationLevel ret [ 'Read Only' ] = obj_au_settings . ReadOnly ret [ 'Recommended Updates' ] = obj_au_settings . IncludeRecommendedUpdates ret [ 'Scheduled Day' ] = day [ obj_au_settings . ScheduledInstallationDay ] if ( obj_au_settings . ScheduledInstallationTime < 10 ) : ret [ 'Scheduled Time' ] = '0{0}:00' . format ( obj_au_settings . ScheduledInstallationTime ) else : ret [ 'Scheduled Time' ] = '{0}:00' . format ( obj_au_settings . ScheduledInstallationTime ) return ret
get current windows update settings .