Feb 13, 2009 #1 topcat01 Programmer Joined Jul 10, 2003 Messages 83 Location GB Hi, Does anybody know if it is possible to disable the Windows Desktop Search service programmatically using Delphi? This is a service on a Vista machine. If fact is it possible to disable any service? Thanks
Hi, Does anybody know if it is possible to disable the Windows Desktop Search service programmatically using Delphi? This is a service on a Vista machine. If fact is it possible to disable any service? Thanks
Feb 13, 2009 #2 paulmatt Programmer Joined Dec 3, 2008 Messages 19 Location GB Yes, it certainly used to be (not sure about Vista). Quick and dirty: winexec(pchar('net stop spooler'), SW_SHOW); Substitute "spooler" for the name of the service. Paul Rigby http://www.awgarstone.comVBA, C#, Delphi Upvote 0 Downvote
Yes, it certainly used to be (not sure about Vista). Quick and dirty: winexec(pchar('net stop spooler'), SW_SHOW); Substitute "spooler" for the name of the service. Paul Rigby http://www.awgarstone.comVBA, C#, Delphi
Feb 13, 2009 #3 Glenn9999 Programmer Joined Jun 19, 2004 Messages 2,312 Location US Sure. Call the service controller command-line interface using CreateProcess or ShellExecute To disable the BITS service Code: sc config "BITS" start= disabled To enable the BITS service to automatic Code: sc config "BITS" start= auto To enable the BITS service as manual Code: sc config "BITS" start= demand Look at the Adminstrative services panel under the properties for the service you're interested in to find out the proper name. Measurement is not management. Upvote 0 Downvote
Sure. Call the service controller command-line interface using CreateProcess or ShellExecute To disable the BITS service Code: sc config "BITS" start= disabled To enable the BITS service to automatic Code: sc config "BITS" start= auto To enable the BITS service as manual Code: sc config "BITS" start= demand Look at the Adminstrative services panel under the properties for the service you're interested in to find out the proper name. Measurement is not management.
Feb 13, 2009 #4 whosrdaddy Vendor Joined Mar 11, 2003 Messages 4,231 Location BE or the correct way, using the servicemanager: http://www.koders.com/delphi/fidA93FC2FB49EF3AF452264065040CB865BEE563A5.aspx there are components out there that allow even better control (like NTSet) but they also use the servicemanager. One thing you need to be sure of is that the user has enough rights to start/stop services. Cheers, Daddy ----------------------------------------------------- What You See Is What You Get Never underestimate tha powah of tha google! Upvote 0 Downvote
or the correct way, using the servicemanager: http://www.koders.com/delphi/fidA93FC2FB49EF3AF452264065040CB865BEE563A5.aspx there are components out there that allow even better control (like NTSet) but they also use the servicemanager. One thing you need to be sure of is that the user has enough rights to start/stop services. Cheers, Daddy ----------------------------------------------------- What You See Is What You Get Never underestimate tha powah of tha google!
Feb 13, 2009 Thread starter #5 topcat01 Programmer Joined Jul 10, 2003 Messages 83 Location GB Thanks guys that's more than enough to get me started. Have a good weekend. Upvote 0 Downvote