Click here to Skip to main content
15,942,154 members
Please Sign up or sign in to vote.
4.20/5 (2 votes)
See more:
If I start a programm by Process.Start() on windows 8, it becomes a higher integrity level than starting the same from the desktop or explorer.

I noticed this, because drag and drop operations from explorer to the programm window are blocked suddenly.

I get the issue on another pc's, but only with Win8 (and up I think). My dev system is running on Win7 for some reasons, so I can't debug it.

The 1st exe is startet from desktop, and DragEnter works fine. Then, it starts a 2nd exe (then 1st exe exits), and the 2nd restarts the 1st exe after update it. Thereafter, the 1st exe no more receives DragEnter event. But, after exit and starting from desktop, DragEnter will work again.

Note:
With the code from A Quick-Start Guide of Process Mandatory Level Checking and Self-elevation under UAC I figured out, that the integrity level is changed from Medium to High.

What is going wrong?
C#
Process p = new Process();
p.StartInfo.FileName = fileName;
p.StartInfo.Arguments = arguments;
p.Start();

There are no operations performed to change the integrity level in both executables.
Posted
Updated 16-Mar-15 6:06am
v3
Comments
Richard Deeming 11-Mar-15 15:02pm    
I can't reproduce the problem on my computer. Is the program that's calling Process.Start running elevated?
BlackMilan 12-Mar-15 3:33am    
I don't think so. That's all:

<pre lang="c#">
Process p = new Process();
p.StartInfo.FileName = fileName;
p.StartInfo.Arguments = arguments;
p.Start();
</pre>
Stephen Hewison 11-Mar-15 15:44pm    
I does sound like an issue with UAC. Are you only getting this issue when debugging in Visual Studio? Is your VS running as administrator? I've had similar issues using the SendKeys feature. You cannot pass instructions from a none administrator process to an administrator process otherwise this would be an exploitable hole in Windows security. Do you get the problem if you run your binary which executes the Process.Start() direction instead of through visual studio?
BlackMilan 12-Mar-15 4:04am    
Thanks, but no, I get the issue on another pc.

The 1st exe is startet from desktop, and DragEnter works fine. Then, it starts a 2nd exe, and the 2nd restarts the 1st exe after update it. Thereafter, the 1st exe no more receives DragEnter event. But, after exit and starting from desktop, DragEnter will work again.

I'm confused while reading about MIC and UAC, because this issue should also exist on Windows 7, but there isn't it. Only Windows 8.
Herman<T>.Instance 12-Mar-15 6:17am    
so 1 calls 2 (but 1 is still active) and 2 calls a new 1 (premier 1 and 2 both active) Have you checked your taskmanager?
Shouldn't 1 call 2 and when 2 is finished return to 1 in stead of restarting a new 1?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900