Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Yuri Rubinov
  Where is Yuri Rubinov?
 Philadelphia
 Pennsylvania - United States
 Yuri Rubinov
 To: Pete Sass
  Where is Pete Sass?
 Marathon, Ontario
 Canada
 Pete Sass
 Tags
Subject: RE: Net Start , Net Stop "Yuri"
Thread ID: 50976 Message ID: 51004 # Views: 2 # Ratings: 0
Version: Not Applicable Category: Win32API programming
Date: Tuesday, September 07, 2004 9:48:23 PM         
   


Pete,

First observe what services are listed in the Windows Services list (from Control Panel). Try to manually terminate services that you need, and to get the proper sequence of manipulations with them. Also see my reply to Ken.

> Hi,
> I too am interested in this.... I just did some recode to modify for a function type of call to play with:
>
> FUNCTION StopServ
> LPARAMETERS cServName
>
> lltest=.F.
>
> locomputer = getobject("WinNT://"+LEFT(SYS(0),AT(" ",SYS(0))-1)+",computer")
> FOR EACH loservice IN locomputer
> WITH loservice
> If Upper(.Class) = 'SERVICE' ;
> and cServName$upper(.displayname) AND .Status = 4
> .Stop
> lltest=.T.
> ENDIF
> ENDWITH
> ENDFOR
>
> RETURN lltest
>
> So if I :
> ?StopServ("Messenger")
> I should stop my messenger service ??????
> I tried and does not stop the service.. am I missing something???
> What are you actually getting with the getobject() call to WinNT://.... .... .... .... ???
>
> Pete from the Great White North. (Only in Canada, ay.) Over and Out ...


ENTIRE THREAD

Net Start , Net Stop Posted by A QP @ 9/7/2004 3:18:06 PM
RE: Net Start , Net Stop Posted by Pete Sass @ 9/7/2004 5:04:46 PM
RE: Net Start , Net Stop Posted by Yuri Rubinov @ 9/7/2004 5:41:24 PM
RE: Net Start , Net Stop Posted by Ken Blum @ 9/7/2004 6:02:49 PM
RE: Net Start , Net Stop "Yuri" Posted by Pete Sass @ 9/7/2004 6:46:53 PM
RE: Net Start , Net Stop "Yuri" Posted by Yuri Rubinov @ 9/7/2004 9:48:23 PM
RE: Net Start , Net Stop "Yuri" Posted by Mz @ 9/11/2004 5:41:50 AM
RE: Net Start , Net Stop "Yuri" Posted by Yuri Rubinov @ 9/11/2004 8:12:57 PM
RE: Net Start , Net Stop "A" Posted by A QP @ 9/13/2004 4:42:25 PM
RE: Net Start , Net Stop Posted by Yuri Rubinov @ 9/7/2004 9:43:06 PM
RE: Net Start , Net Stop Posted by Mz @ 9/9/2004 9:38:59 AM