Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programatically Add, Verify, Stop, Start & Remove Servic
Message
From
30/11/2001 08:38:59
 
 
To
30/11/2001 04:54:00
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00586930
Message ID:
00587928
Views:
23
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.
Best,


DD

A man is no fool who gives up that which he cannot keep for that which he cannot lose.
Everything I don't understand must be easy!
The difficulty of any task is measured by the capacity of the agent performing the work.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform