New
#40
Nevermind, trying it out now
We are posting simultaneously. Just to be sure, did you see the previous post of mine with the essentials explained: PowerShell OneGet - Install Apps from Command Line - Page 4 - Windows 10 Forums
# Chocolatey
iex ((new-object net.webclient).DownloadString('http://bit.ly/psChocInstall'))
# install applications
cinst audacity
cinst ccleaner
cinst cdburnerxp
cinst classic-shell
cinst defraggler
cinst everything
cinst firefox
cinst google-chrome-x64
cinst lastpass
cinst malwarebytes
cinst picasa
cinst revouninstallerpro
cinst skype
cinst speccy
cinst teamviewer
cinst thunderbird
cinst treesizefree
cinst utorrent
cinst vlc
cinst windirstat
Above script file works but I have to answer each install as indicated in the Powershell attachment. How can I avoid this (hopefully in easy fashion)
Rich
The short answer: use OneGet in elevated PowerShell instead of Chocolatey and put all apps you want in one command in your script.
See this short video about OneGet installing multiple apps without none whatsoever user interaction, using a few apps from your list as example. (Sorry, I was two hours without Internet connection, had to use a mobile connection so the DL in the video is painfully slow):
You have not installed Chocolatey repositories?
Do this, list numbers referring to screenshot below:
- Check that you have Unrestricted script execution policy, cmdlet is Get-Executionpolicy. If not use Set-Executionpolicy Unrestricted to change it if working on an elevated PS, or Set-Executionpolicy Unrestricted -Scope CurrentUser if working with non-elevated PS
- Add Chocolatey provider with Get-PackageProvider Chocolatey, accept it by clicking Yes in dialog which will be shown
- Check that Chocolatey and NuGet providers were added (adding Chocolatey automatically adds NuGet)
- Now you should be able to see all package sources
Or just this and run as Admin..
Code:# Install Programs Get-Packageprovider Chocolatey Install-Package ` emet, ` skype, ` 7zip, ` AdobeReader, ` notepadplusplus, ` virtualbox, ` treesizefree, ` ccleaner, ` speccy, ` google-chrome-x64 ` -force