简体   繁体   中英

ProcessStartInfo Verb runas?

I cant find the methode in the class, furthermore the methode password is now PasswordInClearText are they any changelogs or anything?

How can i run a process in admin mode now? this didnt worked-->

System.Diagnostics.ProcessStartInfo procStartInfo = new System.Diagnostics.ProcessStartInfo("cmd", "/c " + command);
procStartInfo.UserName = "Memyself";
procStartInfo.PasswordInClearText = "password";

Change your TargetFramework to version of .NET Framework https://msdn.microsoft.com/en-us/library/bb398202.aspx

Based on the information you have provided, I would guess you are targeting .NET Core, which does not have a Property for Verb in ProcessStartInfo.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM