Prevent log to powershell window
Posted: Wed Nov 22, 2023 4:37 pm
I have a powershell script to launch Factorio on Win10.
The script finishes with the launch command...
I've used the above command for years now, but since I recently started Factorio-ising again it's started dumping the log to the powershell session preventing the script session window from closing.
What puzzles me is that start-process documentation indicates is should open the process in a new window, but it doesn't - the log appears in the same window as the rest of the script.
I thought it might have been related to installing Powershell 7.x, but the issue occurs on 5.1 as well.
I can't see any relevant options in Factorio Command_line_parameters - have I missed something?
How can I launch Factorio from a script and force the logging only to file?
Code: Select all
pwsh -FilePath Factorio.ps1
Code: Select all
$process = (Start-Process -FilePath C:\Factorio\bin\x64\Factorio.exe)
What puzzles me is that start-process documentation indicates is should open the process in a new window, but it doesn't - the log appears in the same window as the rest of the script.
I thought it might have been related to installing Powershell 7.x, but the issue occurs on 5.1 as well.
I can't see any relevant options in Factorio Command_line_parameters - have I missed something?
How can I launch Factorio from a script and force the logging only to file?