C
C#16mo ago
trumats

❔ How to make so my app launcher another app with admin rights

public void Button_Click(object sender, RoutedEventArgs e)
{
ProcessStartInfo info = new ProcessStartInfo("RigaUpdater.exe");
info.UseShellExecute = true;
info.Verb = "runas";
Process.Start(info);
App.Current.Shutdown();
//Process.Start("RigaUpdater.exe");
}
public void Button_Click(object sender, RoutedEventArgs e)
{
ProcessStartInfo info = new ProcessStartInfo("RigaUpdater.exe");
info.UseShellExecute = true;
info.Verb = "runas";
Process.Start(info);
App.Current.Shutdown();
//Process.Start("RigaUpdater.exe");
}
3 Replies
trumats
trumatsOP16mo ago
This opens it... but not with admin Rights @SleepWellPedro Ideas
Bailey
Bailey16mo ago
the following is not mine, you should look at : https://stackoverflow.com/questions/2532769/how-to-start-a-process-as-administrator-mode-in-c-sharp however if you want admin rights without knowing the password then it sshould be blocked because if it isn't virusses can use this
Stack Overflow
How to start a Process as administrator mode in C#
I have a Visual Studio Windows app project. I've added code to download an installer update file. The installer after it has finished downloading would need administrator privileges to run. I have ...
Accord
Accord16mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server