# Installs MiniCRM from mayorana.ch. # # irm https://mayorana.ch/install/minicrm.ps1 | iex # # Downloads the Windows installer and starts it. # Source: https://github.com/bennekrouf/minicrm # Licence: PolyForm Noncommercial 1.0.0; commercial use needs a plan, # see https://mayorana.ch/pricing & { $ErrorActionPreference = 'Stop' # Invoke-WebRequest is many times slower with its progress bar drawn. $ProgressPreference = 'SilentlyContinue' $app = 'MiniCRM' $url = 'https://mayorana.ch/downloads/minicrm/latest/minicrm-setup.exe' + '?' + 'utm_source=install-script&utm_medium=cli' $file = Join-Path $env:TEMP ('minicrm-setup-' + [guid]::NewGuid().ToString('N').Substring(0, 8) + '.exe') Write-Host "Downloading $app for Windows..." Invoke-WebRequest -Uri $url -OutFile $file -UserAgent 'mayorana-install/1 (minicrm)' -UseBasicParsing try { Write-Host "Starting the $app installer..." Start-Process -FilePath $file -Wait Write-Host "Done." } finally { Remove-Item $file -ErrorAction SilentlyContinue } }