Jump to content

Please check service code windows


khidotdn
 Share

Recommended Posts

Welcome to AutoIt and the forum!
Can you please show us what you have tried so far?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

  • Moderators

@khidotdn, welcome to the forum. As water mentions, we try to adhere to the "teach a man to fish" motto. I do have the following snippet I use, however, that at least gets you started. You can change the $sService variable to the name of the service you're looking for.

$wbemFlagReturnImmediately = 0x10
$wbemFlagForwardOnly = 0x20
$sService = "Application Identity"

$oWMI = ObjGet("winmgmts:\\.\root\cimv2")
$oItems = $oWMI.ExecQuery("SELECT * FROM Win32_Service", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)

    If IsObj($oItems) Then
       For $oService In $oItems
           If $oService.DisplayName = $sService Then
               ConsoleWrite($oService.DisplayName & " | " & $oService.StartMode & @CRLF)
           EndIf
       Next
    EndIf

From here, I would suggest you take some time to read through the help file to create your GUI. Below is a simple framework that will get you started. I'll leave it to you to learn how to add your own button (look at GUICtrlCreateButton in the help file) and put the code together:

#include <GUIConstantsEx.au3>

    $hGUI = GUICreate("Test", 300, 300)
        GUISetState(@SW_SHOW)

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                Exit
        EndSwitch
    WEnd

Once you have done some reading, and tried some things out on your own, feel free to post your code here if you run into issues. We will do our best to assist.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

@khidotdn, simply put - no. This forum is not a place where you put in a request and someone barfs up the code for you. You have been given more than enough to begin. How about you begin showing some effort?

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...