Open stevenprimeaux opened 5 years ago
I think you can already do that. If you install QGIS with the OSGeo4W installer (see http://download.osgeo.org/osgeo4w/osgeo4w-setup-x86_64.exe ) you can install in a directory of your choice, also on a different drive than C.
Needs to be confirmed by @jef-n
@jef-n would that work without administrative privileges?
@andreasneumann The included installers for the microsoft runtimes require admin privileges - so the installer does to. Apart from that it doesn't need them (the osgeo4w packages themselves are tar balls).
@jef - thanks for the clarifications.
What are the chances that these Microsoft runtime libraries are already existing on the system? In other words: would the QGIS installer detect already existing compatible Microsoft runtime environments and skip the installation if they already exist on the system?
Also: how frequently does QGIS need updates to these Microsoft runtime environments? If they are relatively stable over a couple of years, then the sysadmin may install these runtime environments separately from QGIS and then the user without admin rights could still install QGIS without the runtime? Would this be a useful workflow or do these runtime environments change quite frequently, e.g. with every new QGIS version?
The runtimes are tied to the compiler version used for building the individual packages. The OSGeo4W packages are not built with one compiler version - some because the package didn't need updates, some because the are repackaged from binaries. All runtimes used to be in one package - they are split now, but the package metadatas have not all be updated - so some still depend on the "all runtime" meta package that depends on all. Another thing is that only some in between runtimes require installation (Microsoft introduced that at some point, but reverted it later), the rest could just be included as plain files. So we'd need to investigate, which runtime require installation and whether we actually still need them. If we do, what packages depend on them and what it takes to replace those with ones that depend on later runtimes. Replacing those would enable us to drop the admin privilege requirement. Another thing that has been on my TODO list for long ;)
Regarding the listed options 1 to 3:
The osgeo4w installer is also blocked by some "security" software (Trend Micro considered it to be malware last time I tried it).
Being able to "Install" without an actual installer would improve people's chance of successfully running QGIS... and reduce their chance of getting in trouble with their IT department ;)
The osgeo4w installer is also blocked by some "security" software (Trend Micro considered it to be malware last time I tried it).
yes. I also had this by some stupid AV software. Those are false positives from some batch files.
I run QGIS from an USB-Stick, "basically" portable. Some of the steps/problems that should be considered:
I was able to use QGIS without admin privileges until 3.6.3, with a few manual work. For now 3.8.1 can be launched but only without processing plugin (compilation modification?). The misc vcredist are a problem and it seems that the multiple versions of sqlite3.dll in %PATH% too. My two cents.
VC redistributables should be extracted to a directory in your path. I think sqlite3 is installed by python2/python3 and by QGIS. Do you get error messages for that dll? Or for the Processing Plugin?
VC redistributables are making the postinstall.bat break and need to be edited. It's not too difficult. Sqlite3.dll is used by several programs and I'm not sure that the good one is used, as it's not the first found by «where» command in the shell... But I don't know if it's why the 3.8 processing plugin doesn't work. If only I could trace the problem... An idea?
FWIW I just tried:
C:\Program files
to D:\
on another machine which has old versions of QGIS up to 3.18.D:\QGIS 3.30.0\bin\qgis-bin.env
to replace all instances of C:\PROGRA~1
and C:/PROGRA~1 with
D:`D:\QGIS 3.30.0\bin\qgis-bin.exe
without admin rights.
The first time it started up there was an error message, but there don't seem to be any problems the second time.Even if it wouldn't work on a fresh Windows install with no previous versions of QGIS, and admin intervention was required occasionally due to new VC redistributables, it seems to me that there would be significant benefits to being able to run the installer without admin rights, or download a simple zipped installation of QGIS. QGIS development is rapid and many users would benefit from being able to install new versions regularly, but are in corporate environments where getting an administrator to update QGIS on a regular basis is not feasible. Having a lot more users running up-to-date versions would be a good thing.
I think since we use setup v2 with all the new packages, this issue can be closed. @AlisterH Only thing I discovered, when copying QGIS to another drive/path, the env-file (qgis-ltr-bin.env in my case) in the bin directory does contain the old paths. If you start QGIS via the provided batch file you even don't need the .env file.
I don't think it can be closed. Users currently still need to be able to run the installer somewhere with admin rights and then copy the installed QGIS from there.
Yes, I agree, but the issue is part of osgeo4w and its installer and not of the main QGIS repository. I always use the osgeo4w installer without admin privileges, copy the folder to my USB-Stick, delete the env file and start qgis with the provided bat-file (which sets all the needed environment variables). I even use my QGIS profile from the USB-drive adding the commandline switch "--profiles-path" when starting QGIS. By the way, the VC redistributables are now in the bin directory and do not need to be "installed" (if using the bat file to start QGIS).
By the way, the VC redistributables are now in the bin directory and do not need to be "installed" (if using the bat file to start QGIS).
So there's no reason the standalone installer couldn't allow installing "per user" (e.g. to AppData\Local\Programs), without admin rights?
Sorry, never tried the standalone installer. May be it has command line options like the Osgeo4w setup?
So there's no reason the standalone installer couldn't allow installing "per user" (e.g. to AppData\Local\Programs), without admin rights?
Correct - just that it installs to "Program Files" per default and that doesn't work w/o admin rights.
Hi, is there any news on this feature request?
I am working in a corporate environment where some of the packages to be downloaded by the osgeo4w installer are blocked by the firewall. It would really help if the standalone installer would allow the per user install, because it is downloadable as a whole.
I am working in a corporate environment where some of the packages to be downloaded by the osgeo4w installer are blocked by the firewall.
With OSGeo4W you can Download Without Installing the necessary packages on a privileged machine, then store them somewhere accessible by the unprivileged clients and run the installer using Install From Local Directory.
So there's no reason the standalone installer couldn't allow installing "per user" (e.g. to AppData\Local\Programs), without admin rights?
Correct - just that it installs to "Program Files" per default and that doesn't work w/o admin rights.
Are you sure that it should work without admin rights if an appropriate path is chosen?
I am testing with QGIS-OSGeo4W-3.34.9-1.msi
and C:\Users\user\Desktop\qgis\
.
Regardless of the target installation path, admin rights are always prompted for. The "Install" button in the installer has the admin shield icon. Refusing admin privileges at that step leads to cancellation of the installer.
Feature description
I could see at least three possibilities for installation without administrative rights, examples of which are provided below.
Additional context
Myself and many others work in a context where administrative privileges are required for installation, even onto a local machine and into a local directory where the user has write privileges. When these privileges are not available, users are unable to install valuable open-source analytical tools like QGIS and OSGeo4W.
Here are some examples where I've been able to install applications without administrative rights: