Jump to content
shital

Start process from service window

Recommended Posts

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile_type=a3x
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <Services.au3>
Global $sServiceName = '""Intellisys Processing Service""'

Global $sComputer = "eitl66"

;Check the status of the service, if it is stopped, start it.
Global $aService = 0
Do
    $aService = _Service_QueryStatus($sServiceName, $sComputer)
    If @error Then Exit 1

    If $aService[1] = $SERVICE_STOPPED Then
        If Not _Service_Start($sServiceName, $sComputer) Then Exit 2
    EndIf

    Sleep(500) ;Wait 500 ms.
Until $aService[1] = $SERVICE_RUNNING

not working tested again  .spelling is right . its work for service without space 

Share this post


Link to post
Share on other sites

I'm not sure how to help you.  I do not have any service names on my PC with spaces in them to test with. Theoretically, some quote combination should work.  

You said this didn't work.

Global $sServiceName = "Intell Processing Service"

or this,

Global $sServiceName = '"Intell Processing Service"'

or this.

Global $sServiceName = '""Intell Processing Service""'

Maybe this will work?  

Global $sServiceName = '"""Intell Processing Service"""'

 

Adam

Share this post


Link to post
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

×
×
  • Create New...