Not necessarily if that one returns true if the service is allowed to interact with the desktop. Does it?
-- - Petter Nilsen, [EMAIL PROTECTED] Technical Manager, Internet Development, Visma Software ASA > -----Original Message----- > From: Urs Eichmann [mailto:[EMAIL PROTECTED]] > Sent: Monday, October 14, 2002 12:05 PM > To: [EMAIL PROTECTED] > Subject: Re: [ADVANCED-DOTNET] Is code running under a service? > > > You can use System.Environment.UserInteractive. If this is False, the > program is running as a service. > > Urs > You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.