Jump to content
Sign in to follow this  
ame1011

Closing Windows Services.

Recommended Posts

ame1011

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
Valuater

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
MHz

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.