I have the need for my application to start and stop Windows Services based on certain events. The thing is that this application needs to run as an elevated normal user (In
You can use the Scheduled Tasks facility to accomplish what you want. For scheduling there is an option to schedule a program to run whenever a user logs on. There are options for running the task with alternate credentials.
I couldn't tell you how to set this up programatically (there's probably a WMI interface for it) but it's easy to do through the UI.