Closed DavidScann closed 4 months ago
Use Start-Process
when running and waiting for external processes, that's my only recommendation. Other than that, no idea. Playnite uses standard PowerShell 5.1 runtime and only limited exceptions apply to it compared to running standard PowerShell 5.1 terminal since it's running in "headless" mode, definitely nothing related to process execution.
Seems like this isn't Playnite's issue, so I'll close this issue. Guess I'll have to bug Microsoft about this or whatever 😅
Have you tried using Start-Process? Also try changing working directory for the process, apps have issues if working dir is not set to their folder and script runtimes in Playnite are by default set to game's install directory (Start-Process has an argument to change working dir).
I'll try it later and update you on this issue as soon as I can. Thank you for the tip.
On Tue, 20 Feb 2024, 06:26 Josef Nemec, @.***> wrote:
Have you tried using Start-Process? Also try changing working directory for the process, apps have issues if working dir is not set to their folder and script runtimes in Playnite are by default set to game's install directory (Start-Process has an argument to change working dir).
— Reply to this email directly, view it on GitHub https://github.com/JosefNemec/Playnite/issues/3690#issuecomment-1954216156, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMVFP7ZLX2NSIU7DQH3GPW3YUSQBHAVCNFSM6AAAAABDP73TM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJUGIYTMMJVGY . You are receiving this because you modified the open/close state.Message ID: @.***>
Bug Description
I have a janky Play Action set up where it actually sends ADB commands to my phone where I will remote control it in order to play a game without the use of an emulator (it's a long story)
However, running the script with
.\script.ps1
terminates the script prematurely because of the use of theadb shell monkey
command in order to launch an Android package remotely.When running the script via a terminal window, it is shown to not be an error message, and does everything as expected.
This might be a PowerShell issue, but I've tried using
Invoke-Expression -Command
instead of running the bare adb.exe with theErrorAction SilentlyContinue
parameter, but it does not stop the issue.If this has nothing to do with Playnite and that there is no possible solution, my advanced apologies and thank you for your time.
To Reproduce
adb shell monkey
. For example,.\adb.exe -d shell -n monkey -p com.nexon.bluearchive 1
.ps1
container.ps1
. For example,D:\scrcpy\script.ps1
Diagnostics ID
94e94c8f-9626-405b-875e-18aedf27f74b
Screenshots