ame1011 Posted November 9, 2005 Share Posted November 9, 2005 (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 November 9, 2005 by ame1011 [font="Impact"] I always thought dogs laid eggs, and I learned something today. [/font] Link to comment Share on other sites More sharing options...
Valuater Posted November 9, 2005 Share Posted November 9, 2005 i just used this WinClose("Services") and it worked Win Xp Home 8) Link to comment Share on other sites More sharing options...
MHz Posted November 9, 2005 Share Posted November 9, 2005 (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 EndFuncWhat 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 ServiceAnd 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 serviceRunWait(@ComSpec & ' /c Net Stop ImapiService', '', @SW_HIDE) Edited November 9, 2005 by MHz Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now