Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.ServiceProcess
<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class Service
Inherits System.Web.Services.WebService
Dim myServiceController As New System.ServiceProcess.ServiceController("TestService")
<WebMethod()> _
Public Function ExecuteCustomCommand() As String
Dim status As String
Try
myServiceController.ExecuteCommand(129)
status = "Custom Command Executed Successfully!"
Catch ex As Exception
status = "Failed To Execute Custom Command! " & ex.Message
End Try
Return status
End Function
End Class