Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using VFP to stop Services on a WIN2000 Server
Message
De
08/02/2005 14:22:21
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 7
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00984515
Message ID:
00984841
Vues:
30
I will try it at home on my Win2K machine later.

>I dunno why it cannot stop IISAdmin service. I use it to start and stop a local instance of SQL Server on my PC w/o any problem.
>
>>I get True. Also, I get True for the IsServiceRunning. But I get False for the StopService and StartService. I confirmed that the service did not stop with the StopService. BTW, I am on a XP machine at the moment.
>>
>>>Is "IISAdmin" correct name of the service? What do get from
? oShell.CanStartStopService("IISAdmin")
>>>?
>>>>Actually, I do too. But I am having trouble getting the ServiceStop and ServiceStart to work as expected.
>>>>
>>>>
>>>>oShell = CREATEOBJECT("Shell.Application")
>>>>if oShell.IsServiceRunning("IISAdmin")
>>>>   ? oShell.ServiceStop("IISAdmin", .F.)
>>>>endif
>>>>? oShell.ServiceStart("IISAdmin", .F.)
>>>>
>>>>
>>>>Am I doing it right?
>>>>
Greg Reichert
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform