Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I created an MFC application(not UI) in VS2012. I wanted to run it as window service but I could not do that(I did not find a way to do that), finally I created another service that execute my exe.I installed this service through administrator login but when other users check that exe through their login, exe is not running/not able to access but service is still running.
Please help me to resolve this issue.
Posted

1 solution

Rewrite your application as a Windows Service, not some normal application.

For security reasons, services are no longer allowed put up any kind of user interface. If your application has to interact with the user, you have to re-write to remove that functionality form the service. A second, normal, application would have to be written to interact with the service from the users desktop.
 
Share this answer
 
Comments
AmitMSN2003! 20-Jul-15 8:06am    
Thanks Dave for your comment, my requirement it to use MFC classes and I read that MFC application can not be run as window service, is there any way out!!
Dave Kreskowiak 20-Jul-15 8:31am    
Again, services cannot launch an application that the user sees, for security reasons.

There is no way out of that except to change the entire design of your solution!

If the user has to see the application and interact with it it has to be a normal application, not a service app.

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