Running an application as different user
<p>I want to run my project as a different user but all the solutions I have seen are for initiation of a process as a different user. I want to hard code the username into the project so that every time the program is being ran it runs as that user. The reason I need this is so that users that don't have privileges on my network to be able to start and stop services on the server.</p>

<p>So I need something like having the username and password securely stored in the program so that every time it runs it runs as that user. </p>

<p>As I previously said all I've found previously is impersonation of a user just to start some external process, but I need it to start with that user.</p>

<p><strong>EDIT</strong> </p>

<p>I have found the solution to my problem and it's PsExec.</p>