c# - 使用 explorer.exe 打开应用程序,但添加了设置

标签 c# file batch-file fivem

当我从记事本 .bat 文件运行此文件时,它会打开我的应用程序。但是当我在末尾添加 ?streamermode=1 时,它只会打开空白文件夹。

explorer.exe fivem://connect/IP --> works

explorer.exe fivem://connect/IP?streamerMode=1   --> does not work

最佳答案

命令 Fivem://connect/IPUniform Resource Identifier
此命令启动与该 URI 关联的应用程序

explorer.exe "fivem://connect/IP?streamerMode=1"
explorer.exe "https://stackoverflow.com/"

Powershell:

Start-Process "fivem://connect/IP?streamerMode=1"

CMD:

start "fivem://connect/IP?streamerMode=1"

C#

Process.Start("fivem://connect/IP?streamerMode=1")

您还可以通过浏览器作为站点运行此命令

fivem://connect/IP?streamerMode=1

关于c# - 使用 explorer.exe 打开应用程序,但添加了设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67811294/

相关文章:

java - '.bat' 文件中的参数包含一些空格,我怎样才能正确获取参数?

c# - 在 C# 中创建一组静态常量变量

c# - 更喜欢 EqualityComparer<T> 而不是 IEqualityComparer<T>

c# - 在 .NET Core(.NET Standard 1.4 和 .NET Framework 4.6.1)中对 System.Net.Http 使用 await/async 时出现错误?

java - 在 Java 中是否有 try/catch 的替代方法来打开文件?

PHP 真实文件类型

c# - 在 Asmx Web 服务单元测试中出错

c - 要打开的文件的目录

batch-file - reg 查询后管道不起作用?

c# - 从 C# 运行 .bat 文件