I am using Windows 7 and I want to execute any application in session 1 from a C# code. Do I need to use a service to launch an application in session 1 from C# code?
Asked
Active
Viewed 2,364 times
-3
-
There's nothing special about session 1; did you mean session 0? What are you actually trying to do? (If you aren't using a service, your code is probably *already* running in session 1, so the question doesn't really make sense.) – Harry Johnston Dec 10 '14 at 06:49
2 Answers
0
If you want to run a process in behalf of another user, you need the credentials of the account that's supposed to run the process.
If the process is instead intended to run with your actual credentials, then a egular exe and a new entry in the registry can do the job.
http://msdn.microsoft.com/en-us/library/aa376977%28v=vs.85%29.aspx
Or even simpler, add it to Start up application's menu.

Oscar
- 13,594
- 8
- 47
- 75
0
From the question , I suggests you look here How to Start a Process in Session 1 from a Windows 7 Service for a possible solution.
Starting a session 1 program from a session 0 application in win7/vista seems to be explained in the answer.