Quantcast
Channel: Windows Desktop Development for Accessibility and Automation forum
Viewing all articles
Browse latest Browse all 585

Start Child Process with UAC

$
0
0

I have 2 processes in Program Files (x86). Process 1 starts Process 2 via System.IO.Process.Start in C#. The UAC is enabled and I am running as "standard user" (although results are the same when logged in as admin). I am testing this scenario using 2 simple console applications. Process 1 simply starts process 2 and process 2 just has ReadKey() to keep it alive. Hence there is nothing in the applications that require administrative privileges or accesses system resources.

When process 1 is started from a desktop shortcut, process 2 is started as expected.

When process 1 is started from a batch file, process 2 is never started. If I add a manifest or change the startinfo to shell and "runas" then the UAC prompt shows and Process 2 starts.

However I do not want the UAC elevation prompt.

How is the security different for a batch file (command line) vs shortcut? What is the proper way to start a child process that does not need admin and does not invoke the UAC elevation prompt?


Viewing all articles
Browse latest Browse all 585

Trending Articles