Jump to content

Testing123

Members
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

My Information

  • Agent Count
    < 500 Agents
  1. Testing123

    Deploying Chocolatey

    Hey everyone, I'm pretty new to Automate, and I know a lot of you use Chocolatey in conjunction with Automate. But I'm kind of stumped as to how to deploy Chocolatey via script. Taking, for example, the cmd.exe installer on https://chocolatey.org/install and packaging it in an Automate script, it runs and seems to install Chocolatey as it should, but fails to add the path variable which means it can't subsequently be called with its alias in future scripts. I think this is because I'm failing to run the command under the right context. Running as 'Shell' presumably runs as the system account, so that doesn't work. I'd assume that 'Shell as admin' would work as this uses the site's domain admin credentials, but no joy there either. I'm positive I'm missing something really dumb, and whatever the answer is will help with building Automate scripting in the future. Cheers! quick edit: I did search but didn't find the answer, which makes me think this is forehead-slapping levels of easy, but I just don't seem able to crack it. edit 2: I logged onto a machine, install chocolatey under the localadmin user. Choco /? returns okay for both the regular domain user and the local admin, but trying in command prompt in Automate still doesn't work. Additionally, installing in the same way using NinjaRMM (running script as system user) works fine - the user, scripts in Ninja, and Ninja's command prompt can also run choco /? - I really can't work out why in Automate running as Shell or Shell as admin doesn't work (neither the user or Automate's scripting/command prompt can call choco). So whatever it is, it's an Automate lesson I need to learn.
×