I am trying to run an exe
file from my own machine:
string versionInFolder = @"c:\test.exe";
public void Install(string versionInFolder)
{
ProcessStartInfo processStartInfo = new ProcessStartInfo
{
CreateNoWindow = true,
UseShellExecute = false,
FileName = versionInFolder,
WindowStyle = ProcessWindowStyle.Hidden,
};
using (Process process = Process.Start(processStartInfo))
{
process.WaitForExit();
}
}
This file exist and can run manually but i got this error
:
System.ComponentModel.Win32Exception: 'The requested operation requires elevation'
I found this post but did not understand the reason for this error
and how to solve it.