I am writing a windows service and I can't find the equivalent of Application.ExecutablePath. How do I determine the path? Also, I'm trying to pass an argument using the following code:
Protected Overrides Sub OnStart(ByVal args() As String)
dim myArg as string
myArg = args(0)
When I try to do this, the app errors out as if it's not getting the argument. I'm passing it by setting it as a parameter of the service in the Options window. Is this the correct way to pass an argument to the service?
Protected Overrides Sub OnStart(ByVal args() As String)
dim myArg as string
myArg = args(0)
When I try to do this, the app errors out as if it's not getting the argument. I'm passing it by setting it as a parameter of the service in the Options window. Is this the correct way to pass an argument to the service?