PostgreSQL 9 install on Windows: “Unable to write inside TEMP environment path.”

后端 未结 22 2101
时光说笑
时光说笑 2020-12-15 04:30

I am attempting to install PostgreSQL 9 (postgresql-9.0.3-1-windows.exe) on my WinXP machine and get the following error at the start:

相关标签:
22条回答
  • 2020-12-15 04:57

    My problem was Smad-Av which disables Windows Scripts from running, Only after going through this thread i remembered. I just right clicked the Smad-Av icon and selected Allow Windows-Script & Office-Macro (Permanent).

    0 讨论(0)
  • 2020-12-15 04:58

    In my case the solution was related to NotePad++ being the default application for opening .vbs files. If you have the same situation, here's an elaborate solution:

    http://igordcard.blogspot.co.il/2012/03/unable-to-write-inside-temp-environment.html

    In a nutshell, in the registry, you need to go to HKEY_CLASSES_ROOT\.vbs, and set the (Default) entry back to the string VBSFile.

    0 讨论(0)
  • 2020-12-15 04:58

    To prevent further problems you should also exclude the data directory (where Postgres puts its data) from being scanned by your virus-scanner

    0 讨论(0)
  • 2020-12-15 04:58

    Check the log in the system's TEMP directory (provided the installer is able to write into it). There's lot of information about the errors.

    My issue was that VBS files were associated with a text editor (probably the anti virus software is the culprit) .

    Here you can find some reg edit scripts to revert to the default behaviour: http://www.nilpo.com/2009/07/windows-xp/restoring-vbs-vbscript-script-file-file-associations/#more-107

    Cheers

    0 讨论(0)
  • 2020-12-15 05:00

    Well, in my case nothing worked, and disabling McAffee needed a special ticket with my company's security team to actually do... so I installed using the binaries, by following this guide Helpful Guide.

    In summary, download the binary from here, unzip it, go inside the pgsql folder, create log and data directories in there, and then open a command prompt, navigate to where the pgsql\bin folder is, and run initdb -U postgres -A password -E utf8 -W -D POSTGRESQL_ROOT\data

    You can start and stop the server by running

    "POSTGRESQL_ROOT/bin/pg_ctl" -D "POSTGRESQL_ROOT/data" -l "POSTGRESQL_ROOT/log/pgsql.log" start
    

    and

    "POSTGRESQL_ROOT/bin/pg_ctl" -D "POSTGRESQL_ROOT/data" -l "POSTGRESQL_ROOT/log/pgsql.log" stop
    

    where POSTGRESQL_ROOT is the full path to the pgsql folder.

    0 讨论(0)
  • 2020-12-15 05:01

    I had the same problem with installing PostgreSQL (Unable to write in TEMP environment variable path), the problem was in Windows Script Host which was disabled (check the log file to see if this is your problem). enable it with register editor (run-->regedit) at this location Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows Script Host\Settings by setting its value at 1

    For more details check this web link: http://1stopit.blogspot.com/2011/01/postgresql-83-and-84-fails-to-install.html

    0 讨论(0)
提交回复
热议问题