[osgeo4w-dev] [osgeo4w-setup-x86_64][Question] CLI is skipping the parameters?

João Gaspar joao.f.r.gaspar at gmail.com
Fri Feb 28 06:07:14 PST 2020


Hi Devs,
I'm working a PowerShell script using OSGeo4W Network Installer to download
specific packages in quiet-mode from a mirror and save locally.
What is happening is that we run but don't respect the parameter
--quiet-mode, --no-desktop and don't download the specific packages. Only
download the installer and the setup.ini

This script is based on this gist:
https://gist.github.com/Guts/6303dc5eb941eb24be3e27609cd46985

and I'm following  the https://trac.osgeo.org/osgeo4w/wiki/CommandLine

Additional notes:
OS: Windows 10 Professional

I'm testing as Administrator.
Test with and without quotes (URL, packages) and the behaviour is the same.
I did the same install but with dialogs and the same packages and
everything go right.

My changed script is actually like this:

# Save current working directory
$starter_path = Get-Location

# Move into the user download directory
Set-Location -Path "$env:USERPROFILE/Downloads"

# Download installer (storage standard installer)
Write-Host "= Start downloading the OSGeo4W installer" -ForegroundColor
Yellow
Invoke-WebRequest -Uri "
https://download.osgeo.org/osgeo4w/osgeo4w-setup-x86_64.exe" -OutFile
"osgeo4w-setup-x86_64.exe"

# Download the packages included into the QGIS LTR Specific packages
Write-Host "== Installer downloaded into $env:USERPROFILE/Downloads"
-ForegroundColor Yellow
Write-Host "== Start downloading the QGIS LTR " -ForegroundColor Yellow
.\osgeo4w-setup-x86_64.exe --quiet-mode --download --site "
http://download.osgeo.org/osgeo4w" --no-desktop --advanced --arch x86_64
--autoaccept --packages "qgis-ltr" "qgis-ltr-grass-plugin7"
"qgis-ltr-oracle-provider" "gdal-oracle" "gdal-mrsid" "gdal-ecw" "gdal-mss"
"gdal-filegdb" "hdf4" "hdf5" "libmysql" "netcdf" "oci" "opencl" "grass"
"saga-ltr" "otb-bin" "otb-ice" "otb-python" "python3-exifread"
"python3-h5py" "python3-pip" "python3-plotly" "python3-scipy"
"python3-numpy" "python3-matplotlib" "python3-pyopengl" "python3-pyodbc"
"ffmpeg" | out-null


Did I do something wrong?

Best regards,
João Gaspar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/osgeo4w-dev/attachments/20200228/4f83c09f/attachment.html>


More information about the osgeo4w-dev mailing list