禁用UAC时,应用程序将以常规模式启动(即,它不考虑清单),也不会出现凭据窗口(用于管理员的登录/密码)。
如果禁用了(.NET)应用程序,是否有任何方法迫使运行(.NET)应用程序的Windows在管理特权下运行(就像“running”上下文菜单所做的那样)?
发布于 2012-11-08 00:01:13
运行具有管理权限的应用程序的C# .Net代码:
ProcessStartInfo startInfo = new ProcessStartInfo(cmd); //cmd is the application you are trying to start
startInfo.Verb = "runas"; // This will set it to run as an administrator
startInfo.Arguments = args; // arguments to pass to the application that is being started
Process.Start(startInfo);https://serverfault.com/questions/446521
复制相似问题