4

On my work computer, I get prompted for an elevated login when I try to run osgeo4w-setup-x86_64.exe on Windows 7

Sounds like I should be able to install without admin rights. As of 5/8/19 are they or are they not required?

5

The osgeo4w installer requiring admin rights is a long-standing issue. The installer requests admin rights because some features really do need to be installed as admin (they create Windows services, such as the Apache http server).

But not all features require admin rights, so the workaround is the create a little batch file with the following to run the osgeo4w-setup-x86_64.exe:

@echo off
REM Note there are 2 underscores before COMPAT_LAYER
set __COMPAT_LAYER=RUNASINVOKER
start "" "osgeo4w-setup-x86_64.exe" 

This workaround hasn't been tested on anything other than Windows 7 and I haven't used osgeo4w for years so hasn't been tested on more recent versions of the osgeo4w-setup-x86_64.exe.

  • Sorry! Wrong link. I edited my post. – Evan Thoms May 9 at 17:29
  • This actually answers the question I should have asked: does the installer need to write to places normally requiring admin rights? It was ambiguous to me. No instructions that I could find explicitly stated they were required, and some discussion seemed to indicate they were not. Unfortunately, setting __COMPAT_LAYER=RUNASINVOKER does not work here. It would appear my IT has that workaround blocked. Thanks! – Evan Thoms May 9 at 17:49
  • Geez, this is my day for typos. COMPAT_LAYER is preceded by two underscores, not one. The installation completed fine with the exception of two times when I was prompted for an admin login to run regedit, which I could only close. I guess I will find out at some point if that's a problem. – Evan Thoms May 9 at 18:54
  • @EvanThoms I've updated the answer in your (updated) link as it was outdated and referred to a brief moment in time when the installer didn't require admin. – user2856 May 10 at 1:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.