Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7691625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:40:05+00:00 2026-05-31T20:40:05+00:00

Anyone have a nifty trick (in Python) to detect Windows services that are configured

  • 0

Anyone have a nifty trick (in Python) to detect Windows services that are configured with a Startup Type of “Automatic (Delayed Start)”?

I thought WMI would be the way to go, but services configured as “Automatic” and “Automatic (Delayed Start)” both show up with a StartMode of “Auto”.

For example, on my local Windows 7 box using Services.msc I see that “Windows Update” is configured for “Automatic (Delayed Start)” yet WMI simply shows as “Auto”:

>>> c = wmi.WMI()
>>> local = c.Win32_Service(Caption='Windows Update')
>>> len(local)
1
>>> print local[0]

instance of Win32_Service
{
        AcceptPause = FALSE;
        AcceptStop = TRUE;
        Caption = "Windows Update";
        CheckPoint = 0;
        CreationClassName = "Win32_Service";
        Description = "Enables the... <cut for brevity> ...(WUA) API.";
        DesktopInteract = FALSE;
        DisplayName = "Windows Update";
        ErrorControl = "Normal";
        ExitCode = 0;
        Name = "wuauserv";
        PathName = "C:\\Windows\\system32\\svchost.exe -k netsvcs";
        ProcessId = 128;
        ServiceSpecificExitCode = 0;
        ServiceType = "Share Process";
        Started = TRUE;
        StartMode = "Auto";
        StartName = "LocalSystem";
        State = "Running";
        Status = "OK";
        SystemCreationClassName = "Win32_ComputerSystem";
        SystemName = "MEMYSELFANDI";
        TagId = 0;
        WaitHint = 0;
};

>>> local[0].StartMode
u'Auto'

I welcome any suggestions.

Cheers,
Rob

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T20:40:07+00:00Added an answer on May 31, 2026 at 8:40 pm

    As @RRUZ mentioned, delayed autostart isn’t exposed through WMI. Here’s some sample code for the registry query.

    from _winreg import OpenKey, QueryValueEx, HKEY_LOCAL_MACHINE
    
    # assume delayed autostart isn't set
    delayed = False
    
    # registry key to query
    key = OpenKey(HKEY_LOCAL_MACHINE, 'SYSTEM\CurrentControlSet\services\wuauserv')
    try:
        delayed = bool(QueryValueEx(key, 'DelayedAutoStart')[0])
    except WindowsError, e:
        print 'Error querying DelayedAutoStart key: {0}'.format(e)
    
    print delayed
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a nifty smooth animated scroll that goes up and down depending on
I have this nifty little script that does a nice job of manipulating some
Does anyone have a nifty way of validating telephone numbers using sql (SQL Server
I have just discovered the nifty unhandled exception handler for cocoa-touch. Now that I
I have some nifty javascript that serializes search input. the controller has this: @recipes
Anyone have an idea how I can create a usercontrol that is only available
Anyone have any best practices tips for Rails and sessions? The default session type
anyone have any idea about how to create java program that can read barcode
Anyone have a decent example, preferably practical/useful, they could post demonstrating the concept?
Anyone have any good urls for templates or diagram examples in Visio 2007 to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.