Skip to content

Conversation

@Alan-Huntress
Copy link
Contributor

  • Reworked the exit logic to throw an error if the script can’t finish the action it was executed for. Partners who use RMM’s with this script (such as Ninja) were seeing exit code 0 sometimes when the script was failing to deploy/uninstall/reinstall which makes it more difficult for them to see status at a glance inside their RMM.
  • Made a quick pass at standardizing script output for errors.
  • Improved service detection logic during uninstall.
  • Look for Visual C++ and log if it’s found or not (needed for Rio, see https://huntress.slack.com/archives/C06B99GUBC1/p1766166810829269 ).

@uttie-huntress
Copy link
Contributor

Fwiw, I agree with most of the fixes, and thank you for taking the initiative.
The dependency checking (like vc++, etc), that should be done in the installer so that UI/CLI/Scripts will all receive the same message. (see https://github.com/huntresslabs/rio/pull/684)

Doing it here is tricky because it creates multiple points of management, and the it needs to be conditioned on OS version.

@uttie-huntress
Copy link
Contributor

Doing it here is tricky because it creates multiple points of management, and the it needs to be conditioned on OS version.

I rescind my comment, I though this was enforcing and I stand corrected. 🙇
I think this is great to get ahead of this problem.

Copy link
Contributor

@uttie-huntress uttie-huntress left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic itself makes sense to me, though I'll defer to someone about PS review itself.

@uttie-huntress
Copy link
Contributor

fwiw, I've added a script to the shortcut, it has couple other attributes we might wanna gather.
https://app.shortcut.com/huntress/story/180295/investigate-windows-8-1-rio-install-failures#activity-180309

  • ucrt
  • KB2919355 and KB2999226 status

@uttie-huntress
Copy link
Contributor

Hey @mguy-huntress, the script looks good, and support wants to get ahead of this problem until we can fix it in the product.
Do you have any concerns?

* Changing the order of logging around for efficiency. Log as much overview info as possible first in case the script is unable to complete the overview info will at least be logged (script version, flags that were passed, and keys).
* Write-InstallScriptInfo was not able to run previously as 'main' always was exiting before the function 'Write-InstallScriptInfo' could be called. Moved the exit command to later in execution.
@uttie-huntress
Copy link
Contributor

I know the team's pretty busy and if this works in your testing, I'd suggest committing it.
The benefit of quicker response back to a customer for a failure is high.

The URLs the agent uses have changed slightly over time.
@Alan-Huntress Alan-Huntress merged commit 1c32e37 into main Dec 29, 2025
4 checks passed
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.

3 participants