Sign in to follow this  
Followers 0
ame1011

Closing Windows Services.

3 posts in this topic

#1 ·  Posted (edited)

Maybe it's the lack of sleep, maybe it's cause i'm dumb. Either way, I've looked everywhere and cannot seem to find the functions that close windows services. I've seen the process functions but what i'm looking for is services. Do any such functions exist? If so where can I find them?

EDIT:

I've found the following...

Func ServiceExists($szService)
    RegRead("HKLM\SYSTEM\CurrentControlSet\Services\" & $szService,"DisplayName")
    Return Not @error
EndFunc

What exactly does this return? @error if there is no such service? And nothing if it exists?

Edited by ame1011

[font="Impact"] I always thought dogs laid eggs, and I learned something today. [/font]

Share this post


Link to post
Share on other sites



i just used this

WinClose("Services")

and it worked

Win Xp Home

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Maybe it's the lack of sleep, maybe it's cause i'm dumb. Either way, I've looked everywhere and cannot seem to find the functions that close windows services. I've seen the process functions but what i'm looking for is services. Do any such functions exist? If so where can I find them?

EDIT:

I've found the following...

Func ServiceExists($szService)
    RegRead("HKLM\SYSTEM\CurrentControlSet\Services\" & $szService,"DisplayName")
    Return Not @error
EndFunc

What exactly does this return? @error if there is no such service? And nothing if it exists?

It returns the service Displayname from the shortname used also by the registry keyname.

ServiceExists('ImapiService')

should return IMAPI CD-Burning COM Service

And you would right with your last questions of what error does.

With services, the Net command can help. sc.exe can manipulate services (XP has it).

Edit:

Example of stopping a service

RunWait(@ComSpec & ' /c Net Stop ImapiService', '', @SW_HIDE)
Edited by MHz

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
Sign in to follow this  
Followers 0