servicemanager
.RunningAsService
True/False =
RunningAsService(
)
Indicates if the code is being executed as a service.