identify when running as a service

  • Thread starter Thread starter Jeff Jarrell
  • Start date Start date
Jeff said:
Is there a programmatic way to identify when code is running as a service?

I've been using this ...

If System.Environment.UserInteractive = False Then
' Service Mode '
Else
' something else
End If

HTH,
Phill W.
 
that should do the trick.
thanks,
jeff

Phill W. said:
I've been using this ...

If System.Environment.UserInteractive = False Then
' Service Mode '
Else
' something else
End If

HTH,
Phill W.
 
Back
Top