@echo off cls REM 1) Umgebungsvariablen (Beispiele!) - Environment Variables (examples!) REM Bereitstellungsverzeichnis - provisioning source set "DEPLOY=V:\gisdept\" REM Installationsverzeichnis - install directory set "OSGEO4W_ROOT=C:\gisdept\OSGeo4W64" REM QGIS Version, Text for the desktop shortcut. Change for new versions set "qgis_version=3.10.7" set "qgis_lnk=QGIS 3.10 LTR" REM optional: passende Prozessorarchitektur (64 bit) vorhanden? - check for architecture reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set bit=32BIT || set bit=64BIT if %bit%==64BIT goto INSTALL if %bit%==32BIT REM sorry, no QGIS 32 bit provided msg echo QGIS %qgis_version% LTR (32 bit) ist nicht verfügbar, bitte wenden Sie sich an die GIS Abteilung. pause goto END :INSTALL REM 2) kopieren des vorbereiteten QGIS-Programmpaketes - copy the prepared QGIS folder xcopy "%DEPLOY%\qgisltrZentral" "%OSGEO4W_ROOT%" /e /i /y REM 3) Anpassung an den neuen, lokalen Installationsort - adapt to the new local install dir (in \bin\qgis-ltr-bin-g7.env & \qgis-ltr-bin.env) call "%OSGEO4W_ROOT%\bin\qgis-ltr-grass7.bat" --postinstall call "%OSGEO4W_ROOT%\bin\qgis-ltr.bat" --postinstall REM Create file and icon associations (Admin Privileges required!) start /wait %WINDIR%\regedit /s "%OSGEO4W_ROOT%\apps\qgis-ltr\bin\qgis.reg" REM Create shortcut on desktop for all users (PUBLIC) %OSGEO4W_ROOT%\bin\nircmd.exe elevatecmd shortcut "%OSGEO4W_ROOT%\bin\qgis-ltr-grass7.bat" "~$folder.common_desktop$" "%qgis_lnk% " "" "%OSGEO4W_ROOT%\apps\qgis-ltr\icons\qgis.ico" "" "" "%OSGEO4W_ROOT%\bin" REM if executed with only simple user privileges: place prepared shortcut on users desktop if not exist "%PUBLIC%\Desktop\%qgis_lnk%.lnk" ( copy /y "%OSGEO4W_ROOT%\startQGISltr.lnk" "%USERPROFILE%\Desktop\%qgis_lnk%.lnk" ) goto END :END exit /b