Jump to content
[[Template core/front/profile/profileHeader is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]]

Community Reputation

0 Neutral

My Information

  • Agent Count
    < 500 Agents
  1. Hahaha, well there's 3 hours of my life I'll never get back. Yep, that'll do it. I need to pass back the result of the PS script into the Automate script, but there are plenty of options for doing that so it should be easy enough.
  2. Thanks for replying guys. @Joe.McCall - Thanks for that! I suspect doing this which manually adds the path may well have worked. In the end we got Chocolatey4Automate. It's pretty flexible actually, more flexible than I thought (I was looking at the cut-down version originally). The only wish I have is that it supported location or group policies as well as client-level, as we have clients with different needs/software stacks between locations and it would be nice to manage those via group policies. I'm kind of bamboozled as to why the regular installer didn't work - I use Chco with other RMMs and the regular installation normally works fine with those.
  3. Hey everyone, I've got a need to query HKCU for the currently-logged in user in Powershell. I want to count the number of sub-keys under a particular reg key, so it's a task that CMD wouldn't be able to help with (to my knowledge at least), meaning I can't use Console Shell to run it as the user. A fairly simply task to do in Powershell, but as far as I know there's not a way to run Powershell as a user in the same way we can use CMD with Console Shell. It would be much more simple/reliable if it could be run as the logged in user so it could query HKCU rather than trying to figure out the ID first. Or is that the only way? Use Console Shell to figure out the ID and run it on HK_USERS?
  4. 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.
  • Create New...