Hi to all,
I need to write an application that runs indipendently from the login of the users on Windows.
The application must run in background and log a user automatically in windows when a certain event occurs (in example when I insert a smartcard in a special adaptor) and logout the user when another event occurs.
Have I to write a windows service
Can I open windows form (like popup) from a windows service
Thank you
I need to write an application that runs indipendently from the login of the users on Windows.
The application must run in background and log a user automatically in windows when a certain event occurs (in example when I insert a smartcard in a special adaptor) and logout the user when another event occurs.
Have I to write a windows service
Can I open windows form (like popup) from a windows service
Thank you

Login indipendent application
caesarkim
I execute the application when the service start, but if I'm in Windows logged as user I can see my windows application (a simple popup) to appear when I start the service manually.
If I choose the execution automatic the service starts when the machine boots up but I can't see my popup until I'm logged in windows.
I would only to know if is possible to view graphic application before the login of a user.
Thanks
Morgan Cheng
I want to open my win app before the log of the user in the system, I want that my win app can be opened over the windows form login.
Is this possible
If I choose to run the service as "local system account", telling to "interact with desktop", my app is opened but only when I log into the system with a user account.
If I choose to run as LocalService account the application is in execution when I log in windows but I can't see it.
Please help me
connect2sandeep
I've choose the method before because I found a guide that explain this way to open a winapp from a service (here, in Italian).
I've tried with the System.Diagnostics.Process.Start way, putting the method into the Main of the service and in the OnStart method.
Installed the service with installUtil.exe from console, but when I launch the service I can't see my winapp executed.
So I've tried to call the "calc.exe" app into my service, that surely don't have problems, and after have choosen in the properties of the service "allow service to interact with desktop" I can see the calc.exe in execution.
I've found that my app didn't work because I didn't write the entire path to call it (I thought that put the exe in /bin/debug or in the program main folder was sufficient), in fact if I write the absolute path it works.
Thanks for all ;-)
CollegeSeniorProjectNeedsHelp
This is quite a normal Behaviour, A user can only See his desktop when he login to the Windows and his desktop is shown up, How can you expect that a Windows Application Can come before Login I think this behavior is quite ok and You should go further without digging help for this.
Anyways best of luck. I'm ended here, If you wish you can search for any clues and when you are done also tell me what are your results.
Best of Luck ;-)
Ultrawhack
How are you monitoring All this You can debug it like Write the start time to a text file when Service starts and then write the start time to another text file when the Windows Application Starts if the Differece is minute it means both start before the User Login. Check I'm not sure. You'll see good results after testing different Techniques.
I wish you all the best and Your questions are welcome here ;-) Cheers!!!
Mix from Latvia
I'm trying also to start a windows apps from the service, adding an existing project to the service project, and telling to use the:
using System.Windows.Forms;
using MyWindowsApp;
then, I've commented the main of the winapp, and into the service main, I've added the code to run the windows application:
Application.Run(new Form1());
the service start (even if I debug in VS or if I install it), but I can't see my winapp in execution.
Frank.gogo
Yes Windows serivce will be appropriate for this which can be run under Local System Account even user is not logged in...
Secondly, I dont think you can Pop Form form Windows Service but what you can do is that you Create a seperate Pop up Form application and Run it passing command line arguments which main contain text to display on popup.
System.Diagnostics.Process.Start("PopupApplication.exe", "Show this Message"); // Something like this.
So I hope you'll get it working!!!
Best of Luck ;-)
Roof Top Pew Wee
It wont work like this, Keep 2 projects seperate and dont comment Main Method too. Rather Start the Windows Application using Process class like this:
System.Diagnostics.Process.Start("PopUpApp.exe");
It should work!!!
Cheers ;-)