Would checking a user account help you? IIRC a service would be run as system account or something very similar and I assume you run your application in debug mode under your normal user account. I think OpenProcessToken and GetTokenInformation with TokenUser functions would help here.