|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
check caller before ServiceBase.Run?I have a service application in C#. If the user double-clicks the
service EXE, I want to display a form with options to install or uninstall. In other words, I want: static void Main() { if (invoked by user) { // <-- how to implement this? // display GUI... } else { // invoked by SCM ServiceBase.Run(new ServiceBase[] { new MyServiceClass() }); } } How can I determine how the EXE was invoked? Thanks! Steve >How can I determine how the EXE was invoked? Try checking System.Environment.UserInteractive.Mattias -- Mattias Sjögren [C# MVP] mattias @ mvps.org http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com Please reply only to the newsgroup. |
|||||||||||||||||||||||