Results 1 to 38 of 38

Thread: Controling services in vb

Threaded View

  1. #18
    Addicted Member kewakl's Avatar
    Join Date
    Oct 2006
    Location
    between keyboard and chair
    Posts
    220

    Re: Controling services in vb

    Code:
    ' start/stop/pause/continue a service
    ' SERVICENAME is the internal name of the service
    ' COMMAND can be   0=Start, 1=Stop, 2=Pause, 3=Continue
    '
    ' returns True if successful, False otherwise
    ' if any error, call Err.LastDLLError for more information
    from the devx page - the green remmed out section

    basically
    to start
    ServiceCommand "Schedule", 0

    to stop
    ServiceCommand "Schedule", 1


    check http://support.microsoft.com/kb/189633
    you can determine StartType for a service - <boot|system|auto|demand|disabled>
    b/c if it is disabled, it can't be started on demand (manual)
    Last edited by kewakl; Mar 13th, 2007 at 10:31 PM.
    Do not use if shrinkwrap is broken or missing!
    I'm learning how to fish, too!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width