Click here to Skip to main content
15,884,388 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi guys is there a way I can keep my VB 2010 app running even when a user logs off. I have read about services and have no idea what they are trying to say. If services are the only way, can i just convert my exes to services just like that? A step by step example would do. And i hope services support all the methods i have used. Thanks
Posted
Comments
PIEBALDconsult 8-Aug-14 12:23pm    
A service might work, but, no, you can't just convert an app to a service.
Might a Windows Scheduled Task work for you?
Sergey Alexandrovich Kryukov 8-Aug-14 15:37pm    
Sorry, but if you "have no idea what they are trying to say" even after reading about Windows Services, it's very unlikely that you are going to understand our answers. Before "converting" anything, you should better understand what you are doing.
—SA
vbGoof 9-Aug-14 4:29am    
Thank you guys, I had no choice but to start learning about Services.
PIEBALDconsult how do i work with Scheduled tasks, Do I schedule them to launch my app when no one is logged on?

You can use the code from Running Redis as a Windows Service[^] to run your, or almost any exe as a Windows Service,
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 8-Aug-14 14:46pm    
My 5, but I would think that "almost any exe" would be a big exaggeration. How about UI applications (especially on latest Windows versions)?
—SA
Matthew Dennis 8-Aug-14 14:49pm    
True enough. However, Console Apps work fine, as the output gets thrown away. Just don't try and read from the Console :)
Sergey Alexandrovich Kryukov 8-Aug-14 15:42pm    
No doubt your work works with console-only applications. I'll take a close look at your article...
—SA
In almost all cases, you really need to develop a Windows Service application; this application type is designed exactly for your purpose, it can also be automatically restarted after the system is loaded; this is one of the options. Please see:
http://en.wikipedia.org/wiki/Windows_service[^],
http://msdn.microsoft.com/en-us/library/d56de412%28v=vs.110%29.aspx[^],
http://msdn.microsoft.com/en-us/library/y817hyb6%28v=vs.110%29.aspx[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900