小张今天上数据库的课,装postgreSQL9.6.1,信心十足地下载exe打开,结果安装程序都妹打开直接报错。
清过空间、看过权限没问题后小张开始善用百度。
解答文章挺多,有些用注册表修改:【终结方案】 Windows下安装PostgreSQL 9.0.4:unable to write inside temp environment variable path
但小张失败,找不到.vbs
最后参考了简书的这一篇文章:
unable to write inside temp environment variable path
和CSDN的这一篇文章:
解决:输入错误: 没有文件扩展“.vbs”的脚本引擎
终于解决问题。快乐去恰饭。
·
-
我的电脑->右键属性->高级系统设置->高级->环境变量,看temp文件夹路径。
-
清空一下。temp存放系统临时文件,可以删除。
-
再次运行SQL安装程序,仍然显示TEMP问题。
-
打开temp文件夹,找到最新生成的log文件,打开后可以看到错误具体信息:
可见找不到.vbs的脚本引擎。
上面简书文章在注册表中找到HKEY_CLASSES_ROOT\CLSID
文件夹下后缀为{XXX-00AA004A55E8}的文件夹,将InprocServer32的路径修改为C:\Windows\system32\vbscript.dll
但小张注册表中这个路径本来就没有问题,只好另外查找解决办法。 -
采用CSDN文章中添加.vbs连接的方法。
桌面新建txt文本,复制粘贴以下内容:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.VBS]
@="VBSFile"
[HKEY_CLASSES_ROOT\.VBS\PersistentHandler]
@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"
将文件名修改为vbs.reg
,双击运行。
很多网友都成功了,但小张电脑报错:
最后将txt文档里内容替换为以下内容,然后改名运行,才成功加入了注册表:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.vbs]
@="vbsfile"
[HKEY_CLASSES_ROOT\.vbs\PersistentHandler]
@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"
[HKEY_CLASSES_ROOT\VBSFile]
@="VBScript Script 文件"
"FriendlyTypeName"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,\
00,6f,00,6f,00,74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,\
32,00,5c,00,77,00,73,00,68,00,65,00,78,00,74,00,2e,00,64,00,6c,00,6c,00,2c,\
00,2d,00,34,00,38,00,30,00,32,00,00,00
[HKEY_CLASSES_ROOT\VBSFile\DefaultIcon]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,57,00,53,00,\
63,00,72,00,69,00,70,00,74,00,2e,00,65,00,78,00,65,00,2c,00,32,00,00,00
[HKEY_CLASSES_ROOT\VBSFile\ScriptEngine]
@="VBScript"
[HKEY_CLASSES_ROOT\VBSFile\ScriptHostEncode]
@="{85131631-480C-11D2-B1F9-00C04F86C324}"
[HKEY_CLASSES_ROOT\VBSFile\Shell]
[HKEY_CLASSES_ROOT\VBSFile\Shell\Edit]
@="编辑(&E)"
[HKEY_CLASSES_ROOT\VBSFile\Shell\Edit\Command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,6f,00,\
74,00,65,00,70,00,61,00,64,00,2e,00,65,00,78,00,65,00,20,00,25,00,31,00,00,\
00
[HKEY_CLASSES_ROOT\VBSFile\Shell\Open]
@="打开(&O)"
[HKEY_CLASSES_ROOT\VBSFile\Shell\Open\Command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,57,00,53,00,\
63,00,72,00,69,00,70,00,74,00,2e,00,65,00,78,00,65,00,20,00,22,00,25,00,31,\
00,22,00,20,00,25,00,2a,00,00,00
[HKEY_CLASSES_ROOT\VBSFile\Shell\Open2]
@="在命令提示符中打开(&W)"
[HKEY_CLASSES_ROOT\VBSFile\Shell\Open2\Command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,43,00,53,00,\
63,00,72,00,69,00,70,00,74,00,2e,00,65,00,78,00,65,00,20,00,22,00,25,00,31,\
00,22,00,20,00,25,00,2a,00,00,00
[HKEY_CLASSES_ROOT\VBSFile\Shell\Print]
@="打印(&P)"
[HKEY_CLASSES_ROOT\VBSFile\Shell\Print\Command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,6f,00,\
74,00,65,00,70,00,61,00,64,00,2e,00,65,00,78,00,65,00,20,00,2f,00,70,00,20,\
00,25,00,31,00,00,00
[HKEY_CLASSES_ROOT\VBSFile\ShellEx]
[HKEY_CLASSES_ROOT\VBSFile\ShellEx\DropHandler]
@="{60254CA5-953B-11CF-8C96-00AA00B8708C}"
[HKEY_CLASSES_ROOT\VBSFile\ShellEx\PropertySheetHandlers]
[HKEY_CLASSES_ROOT\VBSFile\ShellEx\PropertySheetHandlers\WSHProps]
@="{60254CA5-953B-11CF-8C96-00AA00B8708C}"
小张终于快乐地装上了PostgreSQL。