views:

41

answers:

1

Hi

My program running as an elevated process, and starting new processes with Process.Start().

For security reasons, I would like to run those new processes as non-elevated.

How to do that?

+1  A: 

Take a look at: http://stackoverflow.com/questions/196949/how-to-run-not-elevated-in-vista-net

The answer is presented at that URL. Also, you may want to read http://go.microsoft.com/fwlink/?LinkId=81232 for why this is not such a good idea...

Michael Goldshteyn
I like this solution, it actually works. the only problem is that it working only on EXE files. What should I do if I want to start .txt file? (it should implicitly start notepad non-elevated)
DxCK
One thing you can do is to find the default .exe associated in the registry with the .txt extension and then start that .exe passing it the .txt file. I don't know of any other way to get the behavior you desire (with elevation suspended). You can check my answer in http://stackoverflow.com/questions/3924753/where-does-windows-store-its-open-with-settings/3924822#3924822 to see how to get the application associated with an extension.
Michael Goldshteyn