0

所以我正在编写一个批处理脚本来优化游戏,我找到了以下在 cmd 中从 Epic Games 启动游戏的方法:

start "" "com.epicgames.launcher://apps/0584d2013f0149a791e7b9bad0eec102%3A6e563a2c0f5f46e3b4e88b5f4ed50cca%3A9d2d0eb64d5c44529cece33fe2a46482?action=launch&silent=true"

这现在适用于 GTA 5,它可以在 cmd 中手动输入,但是当我将它放入批处理脚本时,它只会打开 Epic Games 窗口,但不会启动游戏。

我还尝试在单独的 cmd 窗口中运行命令,如下所示:

start cmd.exe "start "" "com.epicgames.launcher://apps/0584d2013f0149a791e7b9bad0eec102%3A6e563a2c0f5f46e3b4e88b5f4ed50cca%3A9d2d0eb64d5c44529cece33fe2a46482?action=launch&silent=true""

但它仍然什么都不做。它只是说它找不到静音或写错了。回声还显示现在命令中的空格:

start cmd.exe "start "" "com.epicgames.launcher://apps/0584d2013f0149a791e7b9bad0eec102A6e563a2c0f5f46e3b4e88b5f4ed50ccaA9d2d0eb64d5c44529cece33fe2a46482?action=launch  & silent=true""

也许其他人知道出了什么问题或为什么它不起作用?

4

2 回答 2

0
::epic games

::check if EpicGamesLauncher.exe is running already
tasklist /fi "ImageName eq EpicGamesLauncher.exe" /fo csv 2>NUL | find /I "EpicGamesLauncher.exe">NUL
if "%ERRORLEVEL%"=="1" (

::start epic games itself
:: has to be opened like a website link
start "" com.epicgames.launcher://apps

::clears screen not to confuse user during timeout due to weird start command error ("The system cannot find the drive specified.")
cls
echo EpicGamesLauncher.exe is NOT running!
echo Starting Epic Game Launcher...
:: waits x seconds for epic launcher to load
TIMEOUT /T 15

)

::this will start if epic games is open, if not it will just open epic games itself, need double %% because this is a batch file
::com.epicgames.launcher://apps/0584d2013f0149a791e7b9bad0eec102%3A6e563a2c0f5f46e3b4e88b5f4ed50cca%3A9d2d0eb64d5c44529cece33fe2a46482?action=launch&silent=true
start "" com.epicgames.launcher://apps/0584d2013f0149a791e7b9bad0eec102%%3A6e563a2c0f5f46e3b4e88b5f4ed50cca%%3A9d2d0eb64d5c44529cece33fe2a46482?action=launch&silent=true


exit
于 2021-10-19T08:27:13.203 回答
0

我的 cmd 技能已经生锈了,我无法重新创建这个特定的代码,但是你尝试过吗:

start "com.epicgames.launcher://apps/0584d2013f0149a791e7b9bad0eec102A6e563a2c0f5f46e3b4e88b5f4ed50ccaA9d2d0eb64d5c44529cece33fe2a46482?action=launch"
于 2021-08-08T00:41:21.607 回答