CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Location
    MD, USA
    Posts
    35

    Starting/Stopping a Service in XP

    I need to be able to start and stop the Print Spooler service in XP but I can't find any information on it
    Does anybody know how I can do this or where I can find out how to do this?
    Thanks in advance

  2. #2
    Join Date
    Jun 2004
    Location
    UK
    Posts
    28
    The quick and easy (but a bit dirty) way of doing this is to shell to Net Start / Net Stop.

    Example:

    shell "net start ""Print Spooler"" "
    shell "net stop ""Print Spooler"" "

    This will bring up the black command box. If you want to hide this, just add the following:

    shell "net start ""Print Spooler"" ", vbHide

    BTW this will only work with NT4/5 (Win2K and XP)

    Hope this helps.
    George

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

Featured