I have code:
// Execute msi
Process process = new Process();
process.StartInfo.FileName = "msiexec";
process.StartInfo.WorkingDirectory = Path.GetDirectoryName(msiPath);
process.StartInfo.Arguments = $" /passive /i {Path.GetFileName(msiPath)}";
process.StartInfo.Verb = "runas";
process.StartInfo.UseShellExecute = true;
process.Start();
process.WaitForExit();
But I have error:
UseShellExecute is not supported on this platform.
Or if I disable UseShellExecute
process.StartInfo.UseShellExecute = false;
Programm doesn't execute because of admin privileges
Sooo... How can I execute msi as admin in UWP?