Loaders that behave this way are frustrating. They should wait on the real process to proxy its exit code. Show 11 more comments. Active Oldest Votes. Hence, should proceed to quit once the game executable finishes. Improve this answer. Magoo Magoo This may work in a pinch, but it's not useful as a general solution. Still, in general there could be multiple instances of launcherexecutable running in the current session, and you only want the process tree for your particular instance.
PowerShell's start-process -wait is better in this regard. It uses a Windows Job object i. This worked, but I would like to avoid using loops and timers, because the time may change depending on the CPU load and game. I'm sure there is a way to solve this in more "elegant" way.
OrdinaryUser, which versions of PowerShell and Windows are you using? I tested using PowerShell 5. Also, in the published source , I see they create the process suspended and then resume it before assigning it to the job. Depending on relative thread scheduling, and if the launcher is a quick native app, it could exit before PowerShell adds it to the job, so a grandchild process won't be in the job either.
Show 1 more comment. Sign up or log in Sign up using Google. Only if the 3 files are present will it continue. In all probability, it would be best if the subsidiary processes could take an extra parameter the name of this sub-process's "processfinished" file rather than having a fixed number for each.
You could extend this, and use say the date and time to augment the filename so that this entire process could itself be run many times in parallel. Also, start is happier as start "" This allows other arguments to be "quoted" as necessary - the very first "quoted" argument used is used as the "window title" for the process and is likely to be lost to the sub-process.
Routinely assigning a dummy empty if necessary "window title" means you don't trip over this problem in the future. Will pause cmd until the user presses any key. Displays message, "Press any key to continue What it does is pauses the. Multiple syntaxes, very useful command, use this one quite a bit. Very nice one. Syntax is like this: PING 1.
PING can be used to delay execution for a number of seconds. How are we doing? Please help us improve Stack Overflow. Take our short survey. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Making command prompt wait Ask Question. Is this page helpful? Please rate your experience Yes No. Any additional feedback? Submit and view feedback for This product This page. View all page feedback.
In this article.
0コメント