amidaware / rmmagent

Tactical RMM Agent
https://github.com/amidaware/tacticalrmm
Other
132 stars 76 forks source link

Restart TRMM agent if it installs choco #41

Closed silversword411 closed 12 months ago

silversword411 commented 12 months ago

If TRMM agent installs choco anything choco fails because it wasn't in the %PATH% when agent was started.

Just restarting agent service should fix the problem. Hope this is the right spot to put ChatGPTs advise ;)

wh1te909 commented 12 months ago

restarting the agent from within itself requires more care and error handling. also this is not a trmm issue, since trmm agent uses the full path of choco to do choco related things, so choco not being in the path is irrelevant. community scripts or any scripts should not rely on path and always fallback to the full path of the binary if the exe is not found in the path, just how the trmm agent does it.

silversword411 commented 11 months ago

Note to self: git push --force-with-lease is your friend