1

I install chocolatey and the programs I want to install with chocolatey on all my domain devices trough MDT. That works!

But I want to create a task that executes (as SYSTEM) the "choco upgrade all" command, so that when a user (non admin) sign in the domain computer it checks for new versions and installs them.

That way programs like java stay up to date.

But so far I have had no success doing this. I changed the default location of chocolatey to c:\Program Files but it does not work. I think it is because the task doesn't have enough permission right to do so.

Anybody having experience with this?

Thanks

5
  • When creating the task, did you check 'Run with highest privileges'?
    – Berend
    Commented Nov 30, 2016 at 10:14
  • Yes I did that also..
    – m00p
    Commented Nov 30, 2016 at 11:33
  • Program Files has no permissions for non-administrative users. You may want to pick somewhere else. Commented Nov 30, 2016 at 23:35
  • But for real, executing as SYSTEM should work, I'd check the permissions that it has to Program Files. And ensure that the user is SYSTEM when it runs. You can take a look at the logs in the ChocolateyInstall\logs folder to see the output - it shows the user running it. Commented Nov 30, 2016 at 23:38
  • It's still not working, and nothing is showing in the logs if I execute the task manually... , In the task manager I see a process cmd.exe with user SYSTEM. So i know it's being created. But nothing is being done...
    – m00p
    Commented Dec 5, 2016 at 10:06

1 Answer 1

1

I found the solution

After you install chocolatey you have to enable these two features:

choco feature enable -n=allowglobalconfirmation
choco feature enable -n=allowemptychecksums

I needed allowemptychecksums also because adobereader had not a valid checksum.

Then in the task i execute a program:

powershell.exe choco upgrade all

And everything works when a user logs into windows. :)

1
  • Instead of using allowglobalconfirmation you could also use choco upgrade all -y
    – Larsen
    Commented Feb 2, 2023 at 10:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .