Alternative way of installing software

lg
lg Member Posts: 7
edited January 23 in Automations

Hi,

does anyone have an alternative way of installing software (automated) rather than chocolatey?

Software Bundle installation with chocolatey seems quite unreliable (works, works not at all, only some programs get installed, it takes a very long time etc).

As we are depending on it especially for new clients it is slowing us down.


Thanks for any input :-)

Tagged:

Comments

  • cjeffers
    cjeffers Member Posts: 28 ✭✭✭

    Hey @lg, for the majority of applications that we install I have created scripts to use in the event that we run into these issues.

  • lg
    lg Member Posts: 7

    I will try this, thank you

  • mjones
    mjones Member Posts: 184 ✭✭✭✭
    edited January 26

    Intune has worked great for most things we wanted to install on workstations.
    You can publish a list of apps to the "Company Portal" windows app and let them self-install.

    Ninite is also a fantastic app. I have used it in the past and it works great.

  • gert.verhoeven
    gert.verhoeven Member Posts: 23

    You can easily create your own PowerShell script if you can host the software package on the web.

    This is what I use to download Cisco AnyConnect package which includes the config XML.
    The Hash check is there to make sure the package hasn't been modified or corrupted. Obviously that will be different for the file you would download.

    Invoke-WebRequest "<INSERT URL TO SOFWARE PACKAGE>" -OutFile "C:\Windows\Temp\AnyConnect.zip"
    Expand-Archive -LiteralPath "C:\Windows\Temp\AnyConnect.zip" -DestinationPath "C:\Windows\Temp" -force
    function Compare-FileToHash {
    Param(
    $expectedHash="6C52DAD670B5608BF2C69ECA19EFF6792FA0F34CE2841B568FF67994A67C7521",
    $algorithm="SHA256",
    $Path="C:\Windows\Temp\cisco-secure-client-win-5.0.02075-core-vpn-predeploy-k9.msi"
    )

    $actualHash = (Get-FileHash -Path $Path -Algorithm $algorithm).Hash

    New-Object -TypeName PSObject -Property @{
    "Match" = if ($expectedHash -eq $actualHash) { $true } else { $false }
    }
    }
    if ( $process = Compare-FileToHash True )
    {
    msiexec /package "C:\Windows\Temp\cisco-secure-client-win-5.0.02075-core-vpn-predeploy-k9.msi" /norestart /quiet /lvx* vpninstall.log
    Start-Sleep 60
    Copy-Item "C:\Windows\Temp\RC_AnyConnect.xml" -Destination "C:\ProgramData\Cisco\Cisco Secure Client\VPN\Profile\RC_AnyConnect.xml" -force
    Remove-Item "C:\Windows\Temp\AnyConnect.zip";
    Remove-Item "C:\Windows\Temp\cisco-secure-client-win-5.0.02075-core-vpn-predeploy-k9.msi"
    Remove-Item "C:\Windows\Temp\RC_AnyConnect.xml"
    Write-Host "Success" -ForegroundColor Cyan
    }
    else
    {
    Write-Host "Failed" -ForegroundColor Red
    Remove-Item "C:\Windows\Temp\AnyConnect.zip";
    Remove-Item "C:\Windows\Temp\cisco-secure-client-win-5.0.02075-core-vpn-predeploy-k9.msi"
    Remove-Item "C:\Windows\Temp\RC_AnyConnect.xml"
    }

  • rmiller
    rmiller Member Posts: 13 ✭✭✭

    Just adding to this, I have been able to accomplish this using scripting, and hosting the installation files on Dropbox. Using the AI script generation capability in Atera, I have the script create a folder on the user's hard drive, download the installation files to that folder, and execute it from there. When done, it cleans up the folder and removes all traces.

    The key is to create a link from Dropbox for sharing the file as read-only to everyone (I am not installing anything that can't already be downloaded from the public internet) and changing the parameter at the end of the link from d=0 to d=1 so it is a direct download.

    Here's a generic example:

    #Define Variables
    $folderPath = "C:\software"
    $url = "https://www.dropbox.com/scl/fi/xxxx/xxxx.msi?rlkey=xxxx&dl=1"
    $filePath = "C:\software\xxxx.msi"

    #Create folder
    New-Item -ItemType Directory -Force -Path $folderPath

    #Download the file
    Invoke-WebRequest -Uri $url -OutFile $filePath

    #Install the file with the specified command line parameters
    Start-Process -FilePath $filePath -ArgumentList "/qn", "/norestart" -Wait

    Hope this helps.

  • fred
    fred Member Posts: 3

    winget seems to work as well. if you have a windows 11 or late windows 10 machine, Winget comes preinstalled. I just say winget search chrome or winget install chrome -y and it will run the installation. Winget is a Microsoft thing. It's just like chocolatey, but you don't need packages. Winget will find all the software in your computer and put update what it can for you. There are somethings that are not avaiable in either winget or chocolatey. For those, you just hvae to do it the old fashion way.