您可以在 Windows 中禁用 UNC 路径吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1129703/
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-09-15 12:49:03  来源:igfitidea点击:

Can you disable UNC paths in Windows?

windowspathunc

提问by

We are trying to lock down a Terminal Server, and want to remove a commercial package's ability to accept UNC file paths, ie. paths in the app can then only be entered using the windows drive letters.

我们正在尝试锁定终端服务器,并希望删除商业包接受 UNC 文件路径的能力,即。然后只能使用 Windows 驱动器号输入应用程序中的路径。

Is there any way to do this in Windows?

有没有办法在 Windows 中做到这一点?

Can we disallow UNC paths for just the app?

我们可以只为应用程序禁止 UNC 路径吗?

Can we disallow UNC paths for the entire Terminal Server session?

我们可以禁止整个终端服务器会话的 UNC 路径吗?

The intention is to allow the application to only write to certain directories (as mapped in the Terminal Server session). The aim is to prevent the output of files to directories that the users have access to, but are not mapped in the Terminal Server session.

目的是允许应用程序只写入某些目录(如终端服务器会话中的映射)。目的是防止将文件输出到用户有权访问但未在终端服务器会话中映射的目录。

回答by Dean Rather

According to windowsitpro.com,

根据 windowsitpro.com,

You must edit the NoRun value (of type DWORD) in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer or HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer registry subkey.

您必须编辑 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer 或 HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer 注册表子项中的 NoRun 值(DWORD 类型)。

http://windowsitpro.com/Articles/Print.cfm?ArticleID=25421

http://windowsitpro.com/Articles/Print.cfm?ArticleID=25421

But as Richard said, this is more of a serverfault.com question.

但正如理查德所说,这更像是 serverfault.com 的问题。

回答by David

Look in the GPO under User Configuration>Administrative Templates>Start Menu and Task Bar>Remove Run menu from Start Menu (enabled or disabled?).

查看用户配置>管理模板>开始菜单和任务栏>从开始菜单中删除运行菜单(启用或禁用?)下的GPO。

This prevents the user from entering in a unc path in IE address bar if enabled

如果启用,这可以防止用户在 IE 地址栏中输入 unc 路径