Очень легко исправить:
Просто откройте «Дополнительные параметры системы» на панели управления и создайте новую системную переменную ( System Variable вместо User Variable раздела).
В имени переменной введите, ComSpec а затем в значение переменной введите C:\Windows\system32\cmd.exe .
Альтернативное исправление:
Если у вас уже есть ComSpec переменная в разделе System Variable, удалите ее ; в конце, это должно исправить это.
0 плюса
У меня была похожая проблема. После установки папка данных не содержала файл postgres.conf. Он содержал только одну папку с именем «pg_log». Я описал решение, которое я использовал здесь: Ошибка установки Postgres при чтении файла postgresql.conf
По сути, было бы полезно проверить, есть ли у пользователя полные разрешения для папки postgres, и снова запустить команды «init_db» и «pg_ctl start». Если путь содержит пробел, попробуйте использовать относительный путь для аргумента папки данных pg_ctl.
Автор: eaykin Размещён: 22.06.2013 10:21
0 плюса
Я использую Windows Server 2003 R2, и мне не удалось решить эту проблему с помощью установщика, поэтому я прибег к использованию двоичного пакета PostgreSQL. Надеюсь, это будет альтернативой для тех, кто не хочет выполнять переустановку ОС.
Сначала немного предыстории (надеюсь, полезной для разработчиков)
Все началось с того, что служба postgres не запускалась (сервер работал надежно более года). Я предположил, что это была поврежденная установка PostgreSQL, поэтому я удалил и попытался переустановить. Я столкнулся со следующей ошибкой:
Однако переменная COMSPEC установлена правильно, проверяется с помощью:
Поскольку это Windows Server 2003, в учетной записи администратора нет оболочки UCA, поэтому проблема не возникает.
Ручная установка
0 плюса
просто запустите его от имени администратора и измените системную переменную среды, например, создайте новую переменную «ComSpec» и тип значения «C: \ Windows \ system32 \ cmd.exe».
0 плюса
В моем случае установщик находился в папке% USERPROFILE% \ DownloadsP <папка загрузки Windows>, я переместил установщик на рабочий стол и снова запустился. странно это сработало лол.
Автор: Vaibs Размещён: 28.09.2017 12:10
0 плюса
Если exe-файл установщика находится в сетевой папке, этот подключенный диск может быть фактически недоступен для установщика, так как он работает от имени администратора. Это может часто происходить в некоторых виртуальных машинах, таких как запуск окон в виртуальной машине Parallels. Сначала скопируйте установщик на локальный диск, и у вас не возникнет проблем.
PostgreSQL вечная проблема, не знаю что и делать(((
Ситуация не такая банальная как кажется,по крайне мере для меня
Сначала о системе Windows 7 Х64 профессиональная (активирована,русскоязычная),диск NTFS,компьютер совершенно новый
Устанавливал postgresql версии 9.1.1-1,9.05-1, устанавливаю впервые
Как я понял старые версии не пойдут на компьютере.Скачивал с POstgreSQL.ru.net
Юзер переименован на английский, комп называется по английски, UAC спустил вниз, автоматизировал вторичный вход, отключил антивирус, у меня одна учетная запись администратора, устанавливал в разные папки(давал право на общее пользование ,устанавливал и на разные диски,microsoft visual c++ есть 2008 года,Microsoft.NET Framework 4Extended+русский языковый пакет
Исполнял и такой совет
«Открываем путь c:/windows/system32/drivers/etc/, в этом каталоге открываем блокнотом файл hosts, и в этом файле смотрим прописана ли следующая строчка:
127.0.0.1 localhost
(обратите внимание — строчка должна быть именно такой — без «#»).
Если не прописана, то вписываем её в конец и сохраняем файл.»
Кстати у меня существует # 127.0.0.1 localhost это не противоречит.К тому же у меня два hosts(это связанно с Alcohol120% что бы он не выходил в интернет там использован кряк)
Скачал с сайта некий исходник PostgreSQL 9.05 X64.Так и не понял для чего он нужен,архив не не setupa,куда устанавливать не понятно.
Вымотался психологически жутко,пробуя установить её.
Представляю что меня ещё ждёт установка XM и совместимость PostgreSql
Пишет всю эту долбанутую фразу
Warning
Problem running post-install step. Installation may not complete correctly
The database cluster initialisation failed.
postgresql installation failed
I tried to install postgresql 8.4 in my windows 7 (64 bit). But it fails with following messages in log
I have googled about this and run the command ‘regsvr32 vbscript.dll’ and it shows the message ‘DllRegisterServer in vbscript.dll is succeeded’, but it haven’t solved my issue.
Also I set the default value for
How to fix this issue?
21 Answers 21
Following link solve my issue
The article text:
I’ll keep this one short and sweet. For those of you that have tried to install PostgreSQL (mine was 8.3.7-1) on Windows Vista and got the error Database Cluster Initialisation Failed error at the end of the install, read this.
The problem is that Vista has some safety features associated with setting permissions on the Program Files folder. Basically, even if you are an admin, you can’t change permissions on some folders like Program Files and Windows folder itself. This causes initdb to be unable to create some folders and the database cluster. What this means for you is that you need to install PostgreSQL in another folder that is not inside Program Files.
By the way, if you have forgotten your Postgres account password while installing the first time, just open a Command Prompt in Vista (If you don’t know how, Google for it). Then type the command “net user”. You will see a list of users on your computer. Find Postgre’s account. It’s usually “postgres“. Then you need to change its password by typing “net user postgres new_password” where new_password is… well, a new password for the account. You will be needing that postgres account during install. You will need admin privileges to do this change however.
Firstly, uninstall any failed installations. Use the Control Panel or the PostgreSQL installer in the install folder.
During the install, you will be prompted to choose where you want to install the program. Just select a location in another place. Like “C:\PostgreSQL” or something similar. It may even be on your desktop. But not inside Program Files. Not inside Windows folder. However, it’s not as easy. Bear with me.
After the install, you will still see that darned error message (or something like non-fatal error occured). Do not despair! (For Windows Power Users, we are just assigning Full Control permission to Postgres account on the new PostgreSQL install folder). For other users, read on if you don’t know how to do it.
Go to where you just installed PostgreSQL. In this case, the C: drive. There, right-click on the folder (usually called PostgreSQL), and go to Properties – Security tab. Click on the Edit button. You will now see some usernames and other stuff. Click on the Add button. In the “Enter the object names to select” box, enter “postgres” and press Check. Postgres’ user account should appear there. Click on Ok.
Now from the “Group or Usernames” box, select the Postgres account. In the window below, with lots of checkboxes, assign permission “Full Control” in the Allow Column to it. Note, if you don’t want to allow full control, just give it read/write. But I just went ahead and gave it Full Control. (I was tired and annoyed. The “World’s most advanced open source database” had failed to install!). Click on Ok and wait a bit for permissions to be applied.
Then, just do a re-install. Do not uninstall anything. Just run the setup again. It’ll say that a PostgreSQL install folder already exists and other stuff. Just click on Next until the install finishes. If you see “file cannot be copied” errors, click on the “ignore” button when needed.
That’s it. PostgreSQL should be up and running on Vista now. Hope it works for you too as it did for me, and that my guide is helpful to anybody. If it works, or if you have other solutions, let us know. Thanks for reading! 🙂
I got the same result installing » postgresql-9.2.3-1-windows-x64.exe » on Windows 7 Enterprise and the problem get solved when I change the installation path.
Try to install into » c:\postgresql » instead of » c:\program files\Postgresql «
For me the problem was that PATH variable did not have C:\Windows\system32 and so it did not find ICACLS command to change folder permissions. So the solution is to add C:\Windows\system32 to system PATH variable (if it does not contain it already):
- Control Panel -> System -> Advanced System Settings -> Advanced -> Environment Variables
- Under «System variable» find and select «Path»
- Click «Edit. «
- Now if value does not contain path to system32 append string ;C:\Windows\system32 (or wherever your windows path is)
I’ve pulled shin’s link from the google cache:
PostgreSQL Database Cluster Initialisation Failed Solution
I’ll keep this one short and sweet. For those of you that have tried to install PostgreSQL (mine was 8.3.7-1) on Windows Vista and got the error Database Cluster Initialisation Failed error at the end of the install, read this.
The problem is that Vista has some safety features associated with setting permissions on the Program Files folder. Basically, even if you are an admin, you can’t change permissions on some folders like Program Files and Windows folder itself. This causes initdb to be unable to create some folders and the database cluster. What this means for you is that you need to install PostgreSQL in another folder that is not inside Program Files.
By the way, if you have forgotten your Postgres account password while installing the first time, just open a Command Prompt in Vista (If you don’t know how, Google for it). Then type the command “net user”. You will see a list of users on your computer. Find Postgre’s account. It’s usually “postgres“. Then you need to change its password by typing “net user postgres new_password” where new_password is… well, a new password for the account. You will be needing that postgres account during install. You will need admin privileges to do this change however.
Firstly, uninstall any failed installations. Use the Control Panel or the PostgreSQL installer in the install folder.
During the install, you will be prompted to choose where you want to install the program. Just select a location in another place. Like “C:\PostgreSQL” or something similar. It may even be on your desktop. But not inside Program Files. Not inside Windows folder. However, it’s not as easy. Bear with me.
After the install, you will still see that darned error message (or something like non-fatal error occured). Do not despair! (For Windows Power Users, we are just assigning Full Control permission to Postgres account on the new PostgreSQL install folder). For other users, read on if you don’t know how to do it.
Go to where you just installed PostgreSQL. In this case, the C: drive. There, right-click on the folder (usually called PostgreSQL), and go to Properties – Security tab. Click on the Edit button. You will now see some usernames and other stuff. Click on the Add button. In the “Enter the object names to select” box, enter “postgres” and press Check. Postgres’ user account should appear there. Click on Ok.
Now from the “Group or Usernames” box, select the Postgres account. In the window below, with lots of checkboxes, assign permission “Full Control” in the Allow Column to it. Note, if you don’t want to allow full control, just give it read/write. But I just went ahead and gave it Full Control. (I was tired and annoyed. The “World’s most advanced open source database” had failed to install!). Click on Ok and wait a bit for permissions to be applied.
Then, just do a re-install. Do not uninstall anything. Just run the setup again. It’ll say that a PostgreSQL install folder already exists and other stuff. Just click on Next until the install finishes. If you see “file cannot be copied” errors, click on the “ignore” button when needed.
That’s it. PostgreSQL should be up and running on Vista now. Hope it works for you too as it did for me, and that my guide is helpful to anybody. If it works, or if you have other solutions, let us know. Thanks for reading!
PostgreSQL 9 install on Windows: “Unable to write inside TEMP environment path.”
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:
Some googling around yielded some advice that suggested Windows Scripting Host might be disabled. I’ve checked and WSH is definitely enabled, so it must be something else. Question is, what?
I can see a file called prerun_checks.vbs is created in %TEMP% and when I try to run this manually, I get the following:
Which looks like a permissions error. However, I am an Admin, and I’ve given myself full control of the temp folder and it’s still not working.
Any help appreciated.
23 Answers 23
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:
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 .
As I was finishing off my question above, our IT chap turned up and knew what the problem was immediately: it’s McAfee. It prevents anything from running in a TEMP folder, including Windows Scripting Host scripts. Disabling McAfee for the duration of the installation fixed the problem for me.
So if you see this problem, try disabling your anti-virus.
This is a an old thread, but I just had the same problem on windows 10:
Unable to write inside TEMP environment path
Solve by the following steps
- Check that the problem is related to Windows Script Host.
- From cmd run wscript.exe
- If you get an error Windows Script Host is not enabled and you can solved it by running from cmd
Fix for Current User
Fix for Local Machine
No you can install psql
- run-> regedit and take backup of registry using export
- HKEY_LOCAL_MACHINE->SOFTWARE->Classes->CLSID->B54F3741-5B07-11cf-A4B0-00AA004A55E8> -> InprocServer32
- Modify registry entry with new value as C:\Windows\System32\vbscript.dll
In fact, I found there are 3 entries of HKEY_LOCAL_MACHINE->SOFTWARE->Classes->CLSID->B54F3741-5B07-11cf-A4B0-00AA004A55E8>, and set the first one as above, it works.
If anyone else is searching for information on this and doesn’t have any luck here, you might want to look at:
For follow-ups to the mailing list please read:
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
where POSTGRESQL_ROOT is the full path to the pgsql folder.
All the above did not work for me. I was getting an error like:
Script output: CScript Error: Windows Script Host access is disabled on this machine. Contact your administrator for details.
so after a couple of googling i found the solution: Navigate to the following key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Script Host\Settings
In the right panel, you will see Enabled. If you see the entry 0, it means that the Windows Script Host access is disabled on your Windows machine.
Double Click on it and give it Value Data 1 to enable it.
A value of 1 will enable Windows Script Host A value of 0 will disable Windows Script Host.
for windows 10 navigate to
HKEY_CURRENT_USER\Software\Microsoft\Windows Script Host\Settings
To prevent further problems you should also exclude the data directory (where Postgres puts its data) from being scanned by your virus-scanner
In my case it was another application that caused the problem. Not Notepad++. To others who encounter this problem, you can diagnose it by first deleting all files in C:\Documents and Settings\UserName\Local Settings\Temp so that you’ll be able to find the bitrock_installer.log easily when you try installing postgresql again and view the instructions in it. Changing the (Default) key in the HKEY_CLASSES_ROOT , .vbs section of the registry to VBSFile solved it.
I had this issue when trying to install the 32 bit version on Windows 7 64 bit.
Trying the install kit for 64 bit presented no errors, but the solutions presented by others are also valid.
In my case I’ve downloded McAfee removal tool MCPR (McAfee Consumer Product Removal) which cleaned up some tailings after McAfee uninstallation.
Some registry entries which previously had InprocServer32 values like ‘c:\program files\common files\mcafee\systemcore\. ‘ changed back to its original values:
After that I successfully installed PostgreSQL 9.3
it happens when Notepad++ associates .vbs file types. you can open notepad++ -> Preferences -> fileAssociation Remove the .vbs from the registered exts. Close the notepad++. Try installing Postgres again.
In my case Changing the (Default) key in the HKEY_CLASSES_ROOT, .vbs section of the registry to VBSFile solved it. BlueFish is grab .vbs file association.
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).
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
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) .
My solution is similiar to #5, with an Explantion of how and why McAfee ruins your vbscript registration.
Apparently, when I had McAfee antivirus software on my computer, it bashed the vbscript.dll registration that Windows Scripting Host needs to run .VBS files.
In the exported .REG file:
[HKEY_CLASSES_ROOT\CLSID
That SHOULD be changed back to «C:\Windows\System32\vbscript.dll» now.
McAfee apparently installs a DLL that hijacks the vbscript.dll in order to try to protect bad scripts from running. When I uninstalled McAfee in favor of Microsoft
Security Essentials, McAfee did not restore the registry paths («not my problem»), and the McAfee DLL, of course, was removed from the location during uninstall, so the vbscript.dll registration in fact pointed to NOWHERE and NOTHING.
There has to be a better way to write Antivirus software so that it doesn’t disable the user’s operating system when it is uninstalled, or when features are turned off, or replace registration. See the following:
I have a 64-bit OS. The registry path was changed in a number of locations.
The regular class ID should point to the «C:\Windows\System32\vbscript.dll» 64-bit file.
The «Wow6432Node» registry paths should point to the «C:\Windows\SysWOW64\vbscript.dll» 32-bit file.
Yes, the 64-bits are in the «32» folder and the 32-bits are in the «SysWOW64» folder. Microsoft didn’t want to change the name of the main «System32» execution folder when it migrated to 64-bits.