简体   繁体   English

ProcessStartInfo动词运行方式?

[英]ProcessStartInfo Verb runas?

I cant find the methode in the class, furthermore the methode password is now PasswordInClearText are they any changelogs or anything? 我在类中找不到方法,而且方法密码现在是PasswordInClearText,它们是任何更改日志还是其他内容?

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 将您的TargetFramework更改为.NET Framework版本https://msdn.microsoft.com/zh-cn/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. 根据您提供的信息,我猜您正在将.NET Core作为目标,而.NET Core在ProcessStartInfo中没有动词属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ProcessStartInfo 动词 runas 不起作用 - ProcessStartInfo Verb runas not working 当Verb =“runas”时设置ProcessStartInfo.EnvironmentVariables - Set ProcessStartInfo.EnvironmentVariables when Verb=“runas” 动词=“ runas”未以提升的方式运行 - Verb = “runas” not run as elevated ProcessStartInfo不包含“动词”的定义 - ProcessStartInfo does not contain a definition for 'Verb' WiX CustomAction 的子进程忽略 -Verb runAs - Child process of WiX CustomAction ignores -Verb runAs 使用Verb =“runas”的进程不会以Arguments中定义的凭据开头 - Process with Verb = “runas” does not start with the credentials defined in Arguments 标准规范动词的ProcessStartInfo.Verbs属性返回的动词字符串是否因文化而异? - Are the verb strings the ProcessStartInfo.Verbs propery returns for Standard Canonical Verbs different based on culture? 使用ShellExecuteEx和动词“ runas”运行应用程序时如何预选管理员? (Windows XP) - How to preselect Administrator when running an application using ShellExecuteEx with verb “runas”? (Windows XP) 当从使用更安全令牌创建的进程调用时,RunAs Verb 不显示 UAC 弹出窗口且不提升 - RunAs Verb not showing a UAC popup and not elevating, when invoked from a process created with a Safer token ProcessStartInfo参数 - ProcessStartInfo arguments
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM