Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made runProcess errors more descriptive #51

Merged

Conversation

s-m-martin
Copy link
Contributor

Fixes made

Run process was always printing a timeout error, even if the cause wasn't a timeout. That's been fixed so that more detailed errors are returned.

We're also separately grabbing the process object now in order to be able to properly kill it - this ensures we always kill the right process, not a process that just luckily has the same name. This removes the edge case that multiple instances of the install huntress script are running on the same host at the same time.

The new message looks as follows depending on the error:

ERROR: Ping process running as 'ping.exe -n 200 google.com' failed to complete in 5 seconds, full error message: 'This command stopped operation because process "PING (9428)" is not stopped in the specified time-out..'
ERROR: Non-existent EXE for process running as 'blah.exe -n 200 google.com' failed to complete in 5 seconds, full error message: 'This command cannot be run due to the error: The system cannot find the file specified..'

More help is needed to update the other RMM scripts using this powershell

@shortcut-integration
Copy link

@s-m-martin s-m-martin merged commit df5c69e into main Jul 5, 2023
@s-m-martin s-m-martin deleted the feature/sc-97501-update-powershell-install-script-to-print branch July 5, 2023 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants