在 Windows 上安装 PostgreSQL 9:“无法在 TEMP 环境路径内写入。”

发布于 2024-10-20 11:53:12 字数 584 浏览 3 评论 0原文

我尝试在 WinXP 计算机上安装 PostgreSQL 9 (postgresql-9.0.3-1-windows.exe),但在开始时出现以下错误:

无法在 TEMP 环境变量路径中写入。

一些谷歌搜索产生了一些建议 Windows 脚本主机可能被禁用。我已经检查过,WSH 肯定已启用,所以它一定是其他东西。问题是,什么?

我可以看到在 %TEMP% 中创建了一个名为 prerun_checks.vbs 的文件,当我尝试手动运行该文件时,我得到以下信息:

在此处输入图像描述

这看起来像是权限错误。但是,我是管理员,我已经完全控制了临时文件夹,但它仍然无法正常工作。

任何帮助表示赞赏。

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:

Unable to write inside TEMP environment variable path.

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:

enter image description here

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(23

动听の歌 2024-10-27 11:53:13

如果其他人正在搜索这方面的信息并且在这里没有任何运气,您可能需要查看:

http://wiki.postgresql.org/wiki/Troubleshooting_Installation

有关邮件列表的后续内容,请阅读:

http://wiki.postgresql.org/wiki/Guide_to_reporting_problems

If anyone else is searching for information on this and doesn't have any luck here, you might want to look at:

http://wiki.postgresql.org/wiki/Troubleshooting_Installation

For follow-ups to the mailing list please read:

http://wiki.postgresql.org/wiki/Guide_to_reporting_problems

疏忽 2024-10-27 11:53:13

以上所有内容对我都不起作用。我收到如下错误:

脚本输出:
CScript 错误:此计算机上禁用 Windows 脚本宿主访问。请联系您的管理员了解详细信息。

所以经过几次谷歌搜索后我找到了解决方案:
导航到以下键:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Script Host\Settings

在右侧面板中,您将看到“已启用”。如果您看到条目 0,则表示您的 Windows 计算机上禁用了 Windows 脚本宿主访问。

双击它并给它值数据 1 以启用它。

值为 1 将启用 Windows 脚本宿主
值为 0 将禁用 Windows 脚本宿主。

对于 Windows 10,导航至

HKEY_CURRENT_USER\Software\Microsoft\Windows Script Host\Settings

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

天荒地未老 2024-10-27 11:53:13

好吧,就我而言,没有任何效果,并且禁用 McAfee 需要我公司安全团队的特殊票证才能真正执行...因此我按照本指南使用二进制文件进行安装 有用指南

总之,从此处下载二进制文件,解压缩,进入pgsql 文件夹,在其中创建 logdata 目录,然后打开命令提示符,导航到 pgsql\bin 所在位置> 文件夹,然后运行 ​​initdb -U postgres -A password -E utf8 -W -D POSTGRESQL_ROOT\data

您可以通过运行来启动和停止服务器

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

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

其中 POSTGRESQL_ROOT 是 的完整路径>pgsql 文件夹。

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.

不顾 2024-10-27 11:53:13
  1. 搜索“注册表编辑器”并运行它。
  2. 选择 HKEY_CURRENT_USER =>软件=>微软 => Windows 脚本主机 =>设置(Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows Script Host\Settings)
  3. 打开“Enabled”并将值数据更改为“1”。(您会发现它的值为 0)。
    快乐编码!
  1. search for "Registery Editor" and run it.
  2. choose HKEY_CURRENT_USER => SOFTWARE => Microsoft => Windows script host => Setting (Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows Script Host\Settings)
  3. open "Enabled" and change value data to "1".(you will find it with a vlaue of 0).
    Happy coding!
蓝礼 2024-10-27 11:53:13

为了防止进一步的问题,您还应该排除数据目录(Postgres 放置数据的位置),使其不被病毒扫描程序扫描

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

好菇凉咱不稀罕他 2024-10-27 11:53:13

就我而言,是另一个应用程序导致了问题。不是记事本++。对于遇到此问题的其他人,您可以先删除 C:\Documents and Settings\UserName\Local Settings\Temp 中的所有文件来诊断该问题,以便您能够找到 当您尝试再次安装 postgresql 并查看其中的说明时,可以轻松地使用 bitrock_installer.log 。将注册表的 HKEY_CLASSES_ROOT.vbs 部分中的(默认)键更改为 VBSFile 解决了该问题。

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.

初相遇 2024-10-27 11:53:13

我在尝试在 Windows 7 64 位上安装 32 位版本时遇到了这个问题。

尝试 64 位安装套件没有出现任何错误,但其他人提供的解决方案也是有效的。

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.

苦妄 2024-10-27 11:53:13

就我而言,我下载了 McAfee 删除工具
MCPR(迈克菲消费产品删除)
清理了 McAfee 卸载后的一些尾部。

一些之前具有 InprocServer32 值(如 'c:\program files\common files\mcafee\systemcore\...')的注册表项更改回其原始值:

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{B54F3741-5B07-11cf-A4B0-00AA004A55E8}\InprocServer32\(default) = vbscript.dll
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID\{B54F3741-5B07-11cf-A4B0-00AA004A55E8}\InprocServer32\(default) = C:\Windows\SysWow64\vbscript.dll

之后我成功安装了 PostgreSQL 9.3

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:

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{B54F3741-5B07-11cf-A4B0-00AA004A55E8}\InprocServer32\(default) = vbscript.dll
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID\{B54F3741-5B07-11cf-A4B0-00AA004A55E8}\InprocServer32\(default) = C:\Windows\SysWow64\vbscript.dll

After that I successfully installed PostgreSQL 9.3

梦魇绽荼蘼 2024-10-27 11:53:13

当 Notepad++ 关联 .vbs 文件类型时会发生这种情况。
你可以打开notepad++ ->首选项->文件关联
从注册的扩展中删除 .vbs。
关闭记事本++。尝试再次安装 Postgres。

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.

苦笑流年记忆 2024-10-27 11:53:13

就我而言,将注册表的 HKEY_CLASSES_ROOT、.vbs 部分中的(默认)键更改为 VBSFile 解决了该问题。 BlueFish 是抓取.vbs 文件关联。

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.

攀登最高峰 2024-10-27 11:53:13

在临时目录中,我的 bitrock_installer.log 文件具有以下内容:

Executing cscript //NoLogo "C:\Users\MyUser\Local 
Settings\postgresql_installer_1b4eec8be6\prerun_checks.vbs"
Script exit code: 1

Script output:
Input Error: Can not find script file "C:\Users\MyUser\Local 
Settings\postgresql_installer_1b4eec8be6\prerun_checks.vbs".

结果 Windows 在以下目录之间有一个符号链接:

  • C:\Users\cpetrie\Local Settings\Temp
  • C:\Users\cpetrie\AppData\Local\Temp

For出于某种原因,我的“TMP”和“TEMP”用户变量引用“本地设置”路径而不是“AppData”路径。更改此设置解决了我的安装问题。

In the temp directory, my bitrock_installer.log file had the following:

Executing cscript //NoLogo "C:\Users\MyUser\Local 
Settings\postgresql_installer_1b4eec8be6\prerun_checks.vbs"
Script exit code: 1

Script output:
Input Error: Can not find script file "C:\Users\MyUser\Local 
Settings\postgresql_installer_1b4eec8be6\prerun_checks.vbs".

Turns out that Windows has a symlink between the following directories:

  • C:\Users\cpetrie\Local Settings\Temp
  • C:\Users\cpetrie\AppData\Local\Temp

For some reason my "TMP" and "TEMP" user variables were referencing the "Local Settings" path instead of the "AppData" path. Changing this fixed my install issue.

当爱已成负担 2024-10-27 11:53:13

我的问题是 Smad-Av 禁止 Windows 脚本运行,
只有在经历了这个线程之后我才想起来。
我只是右键单击 Smad-Av 图标并选择允许 Windows-Script & Office-宏(永久)

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).

染墨丶若流云 2024-10-27 11:53:13

我在安装 PostgreSQL 时遇到了同样的问题(无法在 TEMP 环境变量路径中写入),问题出在被禁用的 Windows Script Host 中(检查日志文件以查看这是否是您的问题)。使用寄存器编辑器 (run-->regedit) 在此位置 Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows Script Host\Settings 启用它,将其值设置为 1

有关更多详细信息,请查看此 Web 链接: http://1stopit.blogspot。 com/2011/01/postgresql-83-and-84-fails-to-install.html

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

花之痕靓丽 2024-10-27 11:53:13

我在 Windows 10 中遇到了同样的问题,罪魁祸首是操作系统的许可,或者更确切地说是缺乏操作系统的许可,允许可执行文件在用户专用的临时文件夹上写入。

按照我的直觉并将用户临时文件夹更改为与系统相同的文件夹解决了这个问题:Win + Pause/Break 以显示“计算机属性”窗口(您可以通过右键单击桌面上的“计算机”图标 ->“属性”来手动执行此操作) )->点击左侧面板上的高级系统设置->单击环境变量并
在“系统变量”-变量下,找到 TEMP 和 TMP 变量并复制它们的路径。然后,在“管理员的用户变量”- 变量下,找到 TEMP 和 TMP 变量并粘贴路径。无论如何,它总是“C:\Windows\TEMP”;)

我读过这个网站:https://www.askvg.com/where-does-windows-store-temporary-files-and-how-to-change-temp -文件夹位置/

I had the same problem in Windows 10 and the culprit was the OS's permission, or rather the lack thereof, on allowing the executable to write on the User dedicated Temp folder.

Solved it by following my gut and changing the User Temp folder to the same with the system's : Win + Pause/Break to have the Computer Properties window appear (you can do that manually by right-click on Computer icon on Desktop -> Properties) -> click on Advanced System Settings on the panel on the left -> click on Environment Variables and
under "System variables" - Variables, find the TEMP and TMP ones and copy their paths. Then, under "User variables for Administrator" - Variables, find the TEMP and TMP ones and paste the paths. It's most always "C:\Windows\TEMP" anyways ;)

There's this site I read : https://www.askvg.com/where-does-windows-store-temporary-files-and-how-to-change-temp-folder-location/

箜明 2024-10-27 11:53:13

检查系统 TEMP 目录中的日志(前提是安装程序能够写入该目录)。
有很多关于错误的信息。

我的问题是 VBS 文件与文本编辑器相关联(可能是防病毒软件是罪魁祸首)。

在这里您可以找到一些注册表编辑脚本来恢复默认行为:
http: //www.nilpo.com/2009/07/windows-xp/restoring-vbs-vbscript-script-file-file-associations/#more-107

干杯

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

固执像三岁 2024-10-27 11:53:13

我的解决方案与#5 类似,并解释了 McAfee 如何以及为何破坏您的 vbscript 注册。

显然,当我的计算机上安装了 McAfee 防病毒软件时,它破坏了 Windows Scripting Host 运行 .VBS 文件所需的 vbscript.dll 注册。

在导出的.REG文件中:

[HKEY_CLASSES_ROOT\CLSID{B54F3741-5B07-11cf-A4B0-00AA004A55E8}\InprocServer32]
@="C:\Program Files\Common Files\McAfee\SystemCore\ScriptSn.20120327211246.dll"

现在应该改回“C:\Windows\System32\vbscript.dll”。

McAfee 显然安装了一个劫持 vbscript.dll 的 DLL,以试图防止不良脚本运行。当我卸载 McAfee 以转而使用 Microsoft

Security Essentials 时,McAfee 没有恢复注册表路径(“不是
我的问题”),当然,McAfee DLL 在卸载过程中已从该位置删除,因此 vbscript.dll 注册实际上指向无处可去。

必须有一种更好的方法来编写防病毒软件,这样它就不会出现问题。卸载或功能时不要禁用用户的操作系统
已关闭,或更换注册。请参阅以下内容:

https://kc.mcafee.com/corporate/ index?page=content&id=KB71660

我有 64 位操作系统。注册表路径的多个位置已更改。

常规类 ID 应指向“C:\Windows\System32\vbscript.dll”64 位文件。

“Wow6432Node”注册表路径应指向“C:\Windows\SysWOW64\vbscript.dll”32 位文件。

是的,64 位位于“32”文件夹中,32 位位于“SysWOW64”文件夹中。 Microsoft 不想在迁移到 64 位时更改主“System32”执行文件夹的名称。

HKEY_CLASSES_ROOT\CLSID{B54F3741-5B07-11cf-A4B0-00AA004A55E8}
C:\Windows\System32\vbscript.dll

HKEY_CLASSES_ROOT\Wow6432Node\CLSID{B54F3741-5B07-11cf-A4B0-00AA004A55E8}
C:\Windows\SysWOW64\vbscript.dll

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID{B54F3741-5B07-11cf-A4B0-00AA004A55E8}
C:\Windows\System32\vbscript.dll

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID{B54F3741-5B07-11cf-A4B0-00AA004A55E8}
C:\Windows\SysWOW64\vbscript.dll

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID{B54F3741-5B07-11cf-A4B0-00AA004A55E8}
C:\Windows\SysWOW64\vbscript.dll

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{B54F3741-5B07-11cf-A4B0-00AA004A55E8}\InprocServer32]
@="C:\Program Files\Common Files\McAfee\SystemCore\ScriptSn.20120327211246.dll"

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:

https://kc.mcafee.com/corporate/index?page=content&id=KB71660

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.

HKEY_CLASSES_ROOT\CLSID{B54F3741-5B07-11cf-A4B0-00AA004A55E8}
C:\Windows\System32\vbscript.dll

HKEY_CLASSES_ROOT\Wow6432Node\CLSID{B54F3741-5B07-11cf-A4B0-00AA004A55E8}
C:\Windows\SysWOW64\vbscript.dll

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID{B54F3741-5B07-11cf-A4B0-00AA004A55E8}
C:\Windows\System32\vbscript.dll

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID{B54F3741-5B07-11cf-A4B0-00AA004A55E8}
C:\Windows\SysWOW64\vbscript.dll

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID{B54F3741-5B07-11cf-A4B0-00AA004A55E8}
C:\Windows\SysWOW64\vbscript.dll

是你 2024-10-27 11:53:13

在开始修改注册表之前,请检查 WSH 是否实际上已禁用。为此,请在 DOS 框中运行 wscript.exe。

如果您看到一个名为“Windows Script Host Settings”的对话框,则表明 WSH 已启用,并且您的 PostgreSQL 安装问题一定与其他问题有关。
如果您收到一个错误框,显示“Windows Script Host 访问在此计算机上被禁用。请与您的管理员联系以获取详细信息”,则 WSH 被禁用,您的 PostgreSQL 安装问题可能与此相关(也可能无关)。

对我来说,我的问题与 Windows 脚本有关。我通过右键单击任务栏中隐藏图标中的 smadav 图标并选中“允许 Windows 脚本和 Office 宏(永久)”解决了此问题。然后再次双击 PostgreSQL 设置。

Before you start messing with the registry, check if WSH is actually disabled or not. To do that run wscript.exe in the DOS box.

If you see a dialog box called "Windows Script Host Settings", WSH is enabled, and your problem with PostgreSQL installation must be related to something else.
If you get an error box that says "Windows Script Host access is disabled on this machine. Contact your administrator for details", WSH is disabled, and your problem with PostgreSQL installation may be related to it (or may be not).

For me, my problem was related to Windows script. I resolved this by right-clicking on smadav icon in the hidden icons in the task bar and checked "Allow Windows-script and Office-Macro (Permanent)". Then double click on the PostgreSQL setup again.

清君侧 2024-10-27 11:53:13

首先进入注册表编辑器,然后选择 HKEY_CURRENT_USER >软件>微软> Windows脚本主机>设置>默认>将值数据添加到 1 并单击“确定”。完毕!

First go to registry Editor then choose HKEY_CURRENT_USER > software > Microsoft > Windows script host > setting > default > add value data to 1 and click Ok. done!

待天淡蓝洁白时 2024-10-27 11:53:13

禁用Smad Av后,仍然不起作用。因此,我右键单击 Smad Av 托盘图标,然后选择“允许 Windows 脚本和脚本”。 Office-Macro(永久)'并且它起作用了。

After disabling Smad Av, it still did not work. So, I right clicked on the Smad Av tray icon and I selected 'Allow Windows-Script & Office-Macro (Permanent)' and it worked.

梦初启 2024-10-27 11:53:12

就我而言,解决方案与 NotePad++ 作为打开 .vbs 文件的默认应用程序有关。如果您遇到同样的情况,这里有一个详细的解决方案:

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

简而言之,在注册表中,您需要转到 < code>HKEY_CLASSES_ROOT\.vbs,然后将 (Default) 条目设置回字符串 VBSFile

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.

亣腦蒛氧 2024-10-27 11:53:12

这是一个旧线程,但我在 Windows 10 上遇到了同样的问题:

无法在 TEMP 环境路径内写入

通过以下步骤解决

  1. 检查问题是否与 Windows Script Host 有关。
  2. cmd 运行 wscript.exe
  3. 如果您收到错误 Windows 脚本宿主未启用,那么您可以通过从 cmd 运行以下命令来解决该问题

< em>修复当前用户

REG DELETE "HKCU\SOFTWARE\Microsoft\Windows Script Host\Settings" /v Enabled /f

修复本地计算机

REG DELETE "HKLM\SOFTWARE\Microsoft\Windows Script Host\Settings" /v Enabled /f

现在您可以安装 psql

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

  1. Check that the problem is related to Windows Script Host.
  2. From cmd run wscript.exe
  3. If you get an error Windows Script Host is not enabled then you can solved it by running the following from cmd

Fix for Current User

REG DELETE "HKCU\SOFTWARE\Microsoft\Windows Script Host\Settings" /v Enabled /f

Fix for Local Machine

REG DELETE "HKLM\SOFTWARE\Microsoft\Windows Script Host\Settings" /v Enabled /f

Now you can install psql

顾北清歌寒 2024-10-27 11:53:12

当我完成上面的问题时,我们的 IT 人员出现并立即知道问题出在哪里:是 McAfee。它可以阻止任何内容在 TEMP 文件夹中运行,包括 Windows 脚本主机脚本。在安装期间禁用 McAfee 解决了我的问题。

因此,如果您看到此问题,请尝试禁用防病毒软件。

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.

魂牵梦绕锁你心扉 2024-10-27 11:53:12

下一页的答案对我有帮助。
http://forums.enterprisdb.com/posts/list/3040.page

  1. 运行-> 备份注册表
  2. regedit 并使用导出HKEY_LOCAL_MACHINE->SOFTWARE->Classes->CLSID->B54F3741-5B07-11cf-A4B0-00AA004A55E8} -> InprocServer32
  3. 修改注册表项,新值为 C:\Windows\System32\vbscript.dll

事实上,我发现有 3 个条目 HKEY_LOCAL_MACHINE->SOFTWARE->Classes->CLSID->B54F3741-5B07-11cf- A4B0-00AA004A55E8},并按上面设置第一个,就可以了。

The answer in the following page helpped me.
http://forums.enterprisedb.com/posts/list/3040.page

  1. run-> regedit and take backup of registry using export
  2. HKEY_LOCAL_MACHINE->SOFTWARE->Classes->CLSID->B54F3741-5B07-11cf-A4B0-00AA004A55E8} -> InprocServer32
  3. 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文