Running a windows service in Windows7
-
I do not know if this is the right place to ask this question but, I have written a windows service which polls serial port for serial activity and an input device writes out the port with some time interval. In other words, whenever a write occurs, the service reads and process that and make available to another program. Since it would be a waste of time and resource to poll the port all the time, i was starting the service when the main application is running and stopping it when the program exits. However, this scenario does not work for Windows7 and i could not test it but probably for vista as well. I used OpenSCManager with CONNECT but cannot open the service with SERVICE_START or SERVICE_STOP privilege. any idea, how can this be solved? (I am currently reading some UAC stuff but have not found something yet) Best Regards