RequestedExecutionLevel not worked

Andreas Mazatis 131 Reputation points
2022-06-16T16:30:32.19+00:00

I am writing an application that any user, admin or not, can access. At startup an update of the program files under c:\Program files should be performed with Robocopy. Robocopy starts but the permission check does not allow access. I have already experimented process.StartInfo.Verb = "runas"; and in the manifest requestedExecutionLevel. Unfortunately all without success. Is there a way that any user can run this and get access to c:\Program Files via Robocopy?

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,784 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,011 questions
0 comments No comments
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 66,706 Reputation points
    2022-06-16T19:22:57.937+00:00

1 additional answer

Sort by: Most helpful
  1. RLWA32 45,701 Reputation points
    2022-06-16T19:14:46.167+00:00

    In order for the runas verb to be effective you must also specify UseShellExecute=true


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.