Skip to main content
The 2024 Developer Survey results are live! See the results

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • Why don't you just store the data in a different location that doesn't require permission elevation? Vista was more forgiving when writing data to Program Files, with WIndows 7, you must elevate the permissions of the process itself. I suspect initdb is not being elevated despite being started in an elevated command prompt. I assume you are running a supported version of postgresql? (I could careless you using Windows 7, provided postgresql supports it, or you are running a version of postgresql that supports it).
    – Ramhound
    Commented May 27, 2021 at 16:32
  • As could be sneakily guessed from the folder path, i am trying to install postgres13, the most current that was suggested by the website (i'd even install 14 beta, but there was no installer). Using a different folder may be a solution, but the installer can somehow magically do it in "Program Files" as well. I wanted to stick as close to the defaults as possible, which is "Program Files" (i was actually hoping the installer would work out-of-the-box, but apparently not). Tbh i am generally not bound to postgres, but it seemed like a good choice for my use-case (before it failed at install).
    – Doofus
    Commented May 27, 2021 at 16:47
  • My current next attempt will be to compile an alternative getlocales.exe, which just puts "English_United Kingdom" to stdout, and replace the original mid-install. There appears to be an environment variable INITDBOPTS, but the values from the installer supersede it, making it half-useless.
    – Doofus
    Commented May 27, 2021 at 16:49
  • My experience with Office has taught me to ignore file paths, since every current version of Office, is basically “Office 15”. The thread you linked to talked about a .vbs file and how it should do this function in 9.2; I cannot really think of a way to explain why the installer works the way it does.
    – Ramhound
    Commented May 27, 2021 at 16:58