Help with Chocolatey



  • Hi all
    is it possible to incorporate chocolatey package manager with snapin? batch file as snapin to call the chocolatey package for example “choco install adobereader” ?

    I seen another post here by @apathetic_admin but didnt really specify the sample batch script. apathethicadmin, care to share? thanks!
    https://forums.fogproject.org/topic/2644/chocolatey-scripts-for-snapins

    Please help



  • @Avaryan Thanks matey.

    I shouldve mentioned my environment on my post. Windows 10 Enterprise and I just tested with the powershell script you mentioned.

    WORKED FLAWLESSLY!!!

    Thanks and really really appreciated!



  • I haven’t tried this, but since Chocolatey is already installed it would probably be easiest to just use a PowerShell script.

    I did this on my Windows 10 PC with PowerShell 5. This is using PowerShell’s new package manager and adding the Chocolatey site as a provider.

    # Adding the Chocolately repository.
    Install-PackageProvider chocolatey -Force
    
    # Installing the adobereader package from the Chocolatey provider.
    Install-Package -Name adobereader -Provider Chocolatey -Force
    

    Again, haven’t tested it. What you want to do should definitely be possible though.

    Note: No idea what version of Windows or PowerShell you’re running. Windows 10 comes with the Package Manager and PowerShell 5. Windows 7 you can update to PowerShell 4.0 and then manually install the Package Manager. There is an MSI file somewhere on a Microsoft site about it.


Log in to reply
 

418
Online

39180
Users

10828
Topics

103049
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.