[GH #4] Folder Whitespace issue #4
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Zettrox/ztrx. Originally posted by NZAntivist on 2026-11-25T02:08:14Z.
Have found that if the folder the game is contained in has whitespace (i.e Game 6), the script will fail to find the exe.
Error from Logs:
victory.exe : Error: reading G:\GTA
At G:\ztrx-main\ztrx-main\scripts\play.ps1:14 char:1
Caused by:
The system cannot find the file specified. (os error 2)
Folder name is GTA 6 but script stops reading on the whitespace.
Imported from Zettrox/ztrx. Originally posted by NZAntivist on 2026-11-25T02:08:48Z.
Have solved by adding an underscore instead of a space, but just for clarity sake
Imported from Zettrox/ztrx. Originally posted by Yoshi-233 on 2026-11-25T02:51:10Z.
I checked where the argument boundary is on
90b529fwith PowerShell 7.7.0 on Linux. I pointed the unchanged script's-Exeat a native program that prints its arguments. With-Game 'Game Folder/sample.exe', the child received exactly["run", "Game Folder/sample.exe", "--execute"]. The executable, cache and data paths also contained spaces. PassingGameandFolder/sample.exeas two separate arguments instead produced a PowerShell parameter-binding error before the child started.For a Windows comparison, it would help to see the exact invocation with the private part of the path replaced, preserving the quotes, and the PowerShell version. For example, if you launch it from PowerShell, try
& .\scripts\play.ps1 -Game 'G:\Game Folder\sample.exe'. My Linux run confirms how the script forwards a single path argument; I haven't reproduced the Windows truncation in your log.Imported from Zettrox/ztrx. Originally posted by NZAntivist on 2026-11-25T02:58:16Z.
Powershell Version is 5.1
The command was powershell -ExecutionPolicy Bypass -File scripts\play.ps1 -Game "G:\GTA 6\innerfolderwithnospaces\game_scarlett_master.exe"
as soon as I added an underscore between the A and the 6 it would launch no issues
Imported from Zettrox/ztrx. Originally posted by NZAntivist on 2026-11-25T03:14:23Z.
Updating Powershell to 7.7 has broken things further, using the command with the underscored folder now, I now get this output from Powershell and the attached log file:
& : The term '..\target\release\victory.exe' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At G:\ztrx-main\ztrx-main\scripts\play.ps1:14 char:3
ztrx.log
Imported from Zettrox/ztrx. Originally posted by Yoshi-233 on 2026-11-25T03:21:28Z.
Thanks for posting the exact command and the follow-up. You already quoted the full
-Gamepath correctly.The two messages point to different steps. In the original report,
victory.exestarted and reportedError: reading G:\GTA. In the newer console output, PowerShell couldn’t findvictory.exeitself. PR #17 addresses that default executable path. Also, if you reused the originalpowershell -File ...command after installing 7.7, Windows still starts PowerShell 5.1. The executable for PowerShell 7 ispwsh.exe.Could you try this from the repo root in Windows PowerShell 5.1, where you first saw the space issue? It uses an intentionally missing file, so you can leave your working game folder exactly as it is.
A “file not found” error is expected. The useful part is the path after
reading: does the direct run print the fullG:\ztrx path test\intentionally-missing.exe? Does the script log print the same path, or justG:\ztrx? Those two lines are enough.Imported from Zettrox/ztrx. Originally posted by NZAntivist on 2026-11-25T03:31:12Z.
Powershell Output:
Error: reading G:\ztrx path test\intentionally-missing.exe
Caused by:
The system cannot find the path specified. (os error 3)
PS G:\ztrx-main\ztrx-main> powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\play.ps1 -Exe $exe -Game $probe
Exited with 1; log: C:\Users\sddjn\AppData\Local\Temp\ztrx.log
PS G:\ztrx-main\ztrx-main> Select-String -LiteralPath "$env:TEMP\ztrx.log" -Pattern 'Error: reading' | Select-Object -First 1
log file attached
ztrx.log
Imported from Zettrox/ztrx. Originally posted by Yoshi-233 on 2026-11-25T03:36:01Z.
Thanks for running both commands. I checked the attached log: its first line contains the same full
G:\ztrx path test\intentionally-missing.exepath as the direct run. The missing-file error was expected. That confirms the script preserved the spaces in this test with-Exeset explicitly. The originalreading G:\GTAis still unexplained. If it happens again with the real path, the exact command and the firstError: reading ...line from that same run would help us compare.Imported from Zettrox/ztrx. Originally posted by ChackThree on 2026-11-25T04:37:11Z.
Not sure if it will help. But I was having a similar issue.
Was lazy so I just fed it into AI and it created a modified
play.ps1script for me that launches with no issues.Imported from Zettrox/ztrx. Originally posted by Yoshi-233 on 2026-11-25T05:39:28Z.
Thanks, @ChackThree. Moving the
victory.exepath setup out ofparam()matches the fix in #17, which also keeps the-Exeoverride. Good to hear that change got the launcher working on your machine.