jjzjj

UseShellExecute

全部标签

c# - 在 Windows 8 桌面应用程序的默认浏览器中打开 URL

这个问题在这里已经有了答案:Process.Start(url)brokenonWindows8/Chrome-aretherealternatives?(5个答案)关闭1年前。我在桌面应用程序中使用System.Diagnostics.Process.Start启动默认浏览器来访问链接,如下所示。这是在Windows8ProRTM上使用C#和.NET4.0。System.Diagnostics.Process.Start(newProcessStartInfo{FileName=@"http://www.google.com",UseShellExecute=true});这在Win

c# - MSBuild 未处理的异常 : The FileName property should not be a directory unless UseShellExecute is set

版本dotnet核心SDK:2.1.403docker:18.09.7Linux内核:5.0.0-27Ubuntu:18.04.3问题我正在docker中运行一个ASP.NETCore项目。当我docker-composeup时,我得到以下信息:UnhandledException:Microsoft.Build.BackEnd.NodeFailedToLaunchException:TheFileNamepropertyshouldnotbeadirectoryunlessUseShellExecuteisset.--->System.ComponentModel.Win32Exce

c# - 我们什么时候需要将 ProcessStartInfo.UseShellExecute 设置为 True?

////Summary://Getsorsetsavalueindicatingwhethertousetheoperatingsystemshell//tostarttheprocess.////Returns://truetousetheshellwhenstartingtheprocess;otherwise,theprocessis//createddirectlyfromtheexecutablefile.Thedefaultistrue.[DefaultValue(true)][MonitoringDescription("ProcessUseShellExecute")]

c# - 我们什么时候需要将 ProcessStartInfo.UseShellExecute 设置为 True?

////Summary://Getsorsetsavalueindicatingwhethertousetheoperatingsystemshell//tostarttheprocess.////Returns://truetousetheshellwhenstartingtheprocess;otherwise,theprocessis//createddirectlyfromtheexecutablefile.Thedefaultistrue.[DefaultValue(true)][MonitoringDescription("ProcessUseShellExecute")]

c# - ProcessStartInfo.UseShellExecute 有什么大不了的?

ProcessStartInfo.UseShellExecute将如何影响我正在运行的进程?我是否需要UAC的特殊权限才能使用UseShellExecute?它会在不同的用户上运行吗?它会给我新的权限吗? 最佳答案 Windows有两个不同的api函数来启动进程。底层的是CreateProcess(),它直接映射到一个原生的api函数。还有ShellExecuteEx(),一个由shell(Explorer)实现的函数。它具有更高级别的抽象。它们是非常不同的功能,您可以在ProcessStartInfo的文档中看到这一点。Creat

c# - 提升权限不适用于 UseShellExecute=false

我想启动一个具有提升权限但隐藏窗口的子进程(实际上是相同的控制台应用程序)。我接下来要做的是:varinfo=newProcessStartInfo(Assembly.GetEntryAssembly().Location){UseShellExecute=true,//!Verb="runas",};varprocess=newProcess{StartInfo=info};process.Start();这有效:varidentity=newWindowsPrincipal(WindowsIdentity.GetCurrent());identity.IsInRole(Window

c# - System.Diagnostics.Process UseShellExecute 究竟做了什么?

我有一个MSBuild任务执行(除其他外)对xcopy的调用。我发现,当我从一个批处理文件运行我的MSBuild任务时,对xcopy的调用正确执行,并且无法执行或产生任何输出,这些输出让我知道当从另一个批处理文件调用同一个批处理文件时发生了什么带有System.Diagnostics.Process的C#应用程序。两个进程都以大致相同的结构启动:waitProc.StartInfo.Arguments="/C[executable]";waitProc.StartInfo.FileName="cmd.exe";waitProc.StartInfo.UseShellExecute=fal

dotnet 6 创建进程 Process.Start 时设置 UseShellExecute 在 Windows 下对性能的影响

本文将告诉大家,在dotnet6或dotnet7版本里,启动新的进程时,在StartInfo设置UseShellExecute为true和false时,对性能的影响在dotnet6或dotnet7版本里,其他的版本我没有测试和去了解哈,启动新的进程时,在StartInfo设置UseShellExecute为true时,且当调用线程非STA时,在Windows下,性能会较差为什么性能会比较差?下面将从dotnet源代码的角度来告诉大家开始之前,回顾一下UseShellExecute属性的作用,在Process.Start里,是允许调用Shell打开进程的,传入的不一定要求是一个exe等可执行文件

dotnet 6 创建进程 Process.Start 时设置 UseShellExecute 在 Windows 下对性能的影响

本文将告诉大家,在dotnet6或dotnet7版本里,启动新的进程时,在StartInfo设置UseShellExecute为true和false时,对性能的影响在dotnet6或dotnet7版本里,其他的版本我没有测试和去了解哈,启动新的进程时,在StartInfo设置UseShellExecute为true时,且当调用线程非STA时,在Windows下,性能会较差为什么性能会比较差?下面将从dotnet源代码的角度来告诉大家开始之前,回顾一下UseShellExecute属性的作用,在Process.Start里,是允许调用Shell打开进程的,传入的不一定要求是一个exe等可执行文件