postgresql 当我的注册表中不存在 USER DSN 时,如何删除它们

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9540607/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-20 23:41:30  来源:igfitidea点击:

How do I remove USER DSN when they don't exist in my registry

postgresqlodbcdsn

提问by Jeff G

So my computer was recently rebuilt and all my settings were re-imaged to a new computer. This meant that most drivers were not re-installed. Right now I have a bunch of USER DSN that are invalid. I cannot remove or configure them. I get the following error when I try either: http://imgur.com/a/drBkI

所以我的电脑最近被重建,我的所有设置都被重新映像到一台新电脑。这意味着大多数驱动程序没有重新安装。现在我有一堆无效的 USER DSN。我无法删除或配置它们。当我尝试任一时,我收到以下错误:http: //imgur.com/a/drBkI

Google tells me to go to regedit but nothing exists in the following folder HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.INI\ODBC Data Sources.

Google 告诉我转到 regedit,但以下文件夹中不存在任何内容 HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.INI\ODBC Data Sources。

I tried just re-installing the the Posgres ODBC driver but no go. Ran data sources administrator GUI as an administrator and windows still won't let me remove them.

我尝试重新安装 Posgres ODBC 驱动程序,但没有成功。以管理员身份运行数据源管理员 GUI,Windows 仍然不允许我删除它们。

回答by bohica

Not all data sources are in that key, especially if you have a 64 bit machine. 64-bit ODBCexplains where you can find 32/64 bit data sources in the registry.

并非所有数据源都在该键中,尤其是在您拥有 64 位机器的情况下。64 位 ODBC解释了您可以在注册表中的何处找到 32/64 位数据源。

 HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI
 HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI
 HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI

It also explains about registry redirection. The key you are looking is for system DSNs even on a 32 bit machine so you want to look in HKEY_CURRENT_USER.

它还解释了注册表重定向。您正在寻找的关键是即使在 32 位机器上的系统 DSN,因此您想查看 HKEY_CURRENT_USER。