Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programatically Add, Verify, Stop, Start & Remove Servic
Message
 
To
30/11/2001 12:28:35
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00586930
Message ID:
00588185
Views:
35
Doug,

No problem. On its way.


>Roger,
>
>Sure, as long as you understand (and give us permission to so do) that we'll more than likely fold anything we take into a commercial product. The 'rule' I have on my end is that when folks do this I will make sure to give them attribution on our web site (once I have time to deal with that <g>.) The site is really ugly right now and I take no responsibility for it <g>. So, if you're willing I'd be delighted to look at your code as it will save me time and effort. In return, should we use a significant portion of it I'll make sure when I'm able to put a 'blurb' about your contribution if you'd like. Does that work?
>
>If so send it to me at ddodge@homepipeline.com
>
>
>
>
>>Hi Doug,
>>
>>I've got some sample service control code I wrote while experimenting with controling the internet services. It uses the API but it's in VB; you're welcome to it if you want.
>>
>>
>>>Malcolm,
>>>
>>>Thanks! I will make sure to post what I find just as soon as I get the time. <g> I've been very busy.
>>>
>>>
>>>
>>>>Doug,
>>>>
>>>>For a simple, primitive, pragmatic approach, check out the 'net' commands that you can run at the NT/XP CMD prompt.
>>>>
>>>>At the command prompt type:
>>>>
>>>>NET HELP | MORE
>>>>
>>>>As a starting point, check out the following (I think they will handle about 90% of what you're trying to accomplish) ...
>>>>
>>>>* list all services currently running
>>>>NET START
>>>>
>>>>* dump list of services to file TEMP.TMP (may require parsing)
>>>>* NOTE: Services are listed one per line.
>>>>NET START > TEMP.TMP
>>>>
>>>>* start a specific service
>>>>NET START
>>>>
>>>>* terminate a specific service
>>>>NET STOP
>>>>
>>>>Good luck and let us know what solution you finally end up going with.
>>>>
>>>>Malcolm
>>>>
>>>>
>>>>>Hi folks,
>>>>>
>>>>>Any of you API gurus know of a way to programatically Add, Remove, Verify installation of, verify current status (running or stopped) a Windows service?
>>>>>
>>>>>I have a program that runs as a service and I want to also create a separate program that will allow me to remotely manage the service. For example, I may want to install a new version. That would require that I perform a series of functions:
>>>>>
>>>>>1. Is the service currently installed?
>>>>>2. Is it running? If so stop it.
>>>>>3. Remove/Update EXE
>>>>>4. Restart service.
>>>>>5. Verify service is now running or is in original state I found it.
>>>>>
>>>>>I'm thinking that the Windows Scripting Host may be the ticket but I'm a dunce when it comes to knowing the API to call/use.
Previous
Reply
Map
View

Click here to load this message in the networking platform