gpt4 book ai didi

c# - 带参数运行程序

转载 作者:太空宇宙 更新时间:2023-11-03 16:02:11 25 4
gpt4 key购买 nike

在没有 C# 的情况下如何工作:

  1. 赢 + R
  2. 输入:

"C:\Riot Games\League of Legends\RADS\solutions\lol_game_client_sln\releases\0.0.1.4\deploy\League of Legends.exe""8394""LoLLauncher.exe""""spectator 95.172.65.26: 8088 If4hH4/27YhyycyAsxthGMnjzXaIgu7F 1249300997 EUW1"

如您所见,为流程提供了一些参数。我试过这个:

string path = @"C:\Riot Games\League of Legends\RADS\solutions\lol_game_client_sln\releases\0.0.1.4\deploy\League of Legends.exe";

string arguments = @"""8394"" ""LoLLauncher.exe"" """" ""spectator 95.172.65.26:8088 " + firstgameinformation.Trim() + @" EUW1""";

Process.Start(path,arguments);

但该程序无法以同样的方式运行,它只是崩溃了。给出的论据一定有问题。我什至用 ProcessStartInfo 试过了。想不通。

那么我应该如何像 Win+R 一样调用进程呢?

//编辑:Firstgameinformation同If4hH4/27YhyycyAsxthGMnjzXaIgu7F 1249300997

最佳答案

您可能需要设置 ProcessStartInfo.WorkingDirectory属性,以便新进程从可以找到 LoLLauncher.exe 文件的位置启动。

关于c# - 带参数运行程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20832063/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com