0

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

  • When creating the task, did you check 'Run with highest privileges'? – Berend Nov 30 '16 at 10:14
  • Yes I did that also.. – m00p Nov 30 '16 at 11:33
  • Program Files has no permissions for non-administrative users. You may want to pick somewhere else. – ferventcoder Nov 30 '16 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. – ferventcoder Nov 30 '16 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 Dec 5 '16 at 10:06
0

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. :)

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.