Results 1 to 2 of 2

Thread: Start Service with VB

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 1999
    Location
    y
    Posts
    141

    Cool

    Hi All
    I want to write some util that start Service
    How can i do it ?

    Thanks

    Efrat

  2. #2
    Lively Member
    Join Date
    Aug 1999
    Posts
    89
    See if you can convert this script into a vb program...

    Option Explicit
    On Error Resume Next


    Run "net stop ""IIS admin service"" /y"
    Run "net stop ""FTP Publishing Service"""
    Run "net stop ""Microsoft SMTP Service"""
    Run "net stop ""World Wide Web Publishing Service"""

    Run "net start ""World Wide Web Publishing Service"""
    Run "net start ""FTP Publishing Service"""
    Run "net start ""Microsoft SMTP Service"""



    Sub Run(Command)
    On Error Resume Next
    Dim ShellObject, Result
    Set ShellObject = CreateObject("WScript.Shell")
    Result = ShellObject.Run(Command, 5, True)
    NetResults = NetResults & Result & " "
    'Wscript.Echo Result & vbTab & Command
    ShellObject = Empty
    On Error GoTo 0
    End Sub

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