删除“目标另存为” 来自IE

发布于 2024-07-07 15:39:45 字数 84 浏览 5 评论 0原文

有没有办法通过使用组策略或注册表黑客从 Internet Explorer 的右键单击菜单中删除“目标另存为”? 如果失败了,有没有一种简单的编程方式?

Is there any way to remove “save target as” from internet explorer’s right-click menu by using group policies or registry hacks? Failing that is there a simple programmatic way?

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

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

发布评论

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

评论(6

猫卆 2024-07-14 15:39:46

为什么不尝试完全删除右键单击。 或者,如果您需要自己的菜单,您可以使用 div 轻松创建自己的弹出窗口。

无法修改默认菜单并禁用部分菜单。

看看我如何禁用右键单击上下文菜单:

http://www.codeproject.com/tips/42554/Javascript-hack-to-disable-Right-Click-and-Text-Se.aspx

我希望这会对您有所帮助。

Why dont you try removing the right click altogether. Or if you need your own menu, you can create your own popup easily using div's.

There is no way to modify the default menu and to disable a part of the menu as such.

See how I disabled right click context menu here :

http://www.codeproject.com/tips/42554/Javascript-hack-to-disable-Right-Click-and-Text-Se.aspx

I hope this will help you.

半山落雨半山空 2024-07-14 15:39:45

更新:除了我下面的所有说教之外,这就是您正在寻找的答案:

有一个组策略可以关闭 Internet Explorer (IE5+) 中“文件”菜单中的“另存为...”菜单项,可以部署该组策略每台机器或每用户。 但是,该组策略不控制上下文菜单中的“目标另存为...”。

除非您是用户所在公司的 IT 部门的一员,否则尝试限制 HTTP 代理中的用户操作绝不是一个好主意,原因有多种:

  1. 您不应该弄乱用户的计算机
  2. 您可能会破坏其他应用程序
  3. 您不知道用户正在使用什么 HTTP 代理
  4. 依靠限制用户操作充其量是徒劳的,因为任何老练的用户都可能找到一种方法来规避您的限制
  5. 这是疏远用户的最快方法

即使您是其中的一部分对于 IT 部门来说,您应该尽可能限制对用户操作的控制。

Update: Aside from all my preachings below, here's the answer you are looking for:

There is a Group Policy to turn off the "Save As..." menu item from the File menu in Internet Explorer (IE5+), which can be deployed per-machine or per-user. However, that group policy does not control the "Save Target As..." from the context menu.

Unless you are part of the IT department of the company the user is working for, attempting to limit the user actions in the HTTP agent is never a good idea for multiple reasons:

  1. You should not mess with the user's computer
  2. You might be breaking other applications
  3. You don't know what HTTP agent the user is using
  4. Relying on limiting the user actions is at best futile, as any sofisticated user will probably find a way to circumvent your limitation
  5. It's the quickest way to alienate your users

And even if you are part of the IT department, you should try to limit your control over the user's actions as much as possible.

终止放荡 2024-07-14 15:39:45

如果您正在尝试为网站实施某种 DRM 方案 - 只是不要这样做。 它们根本不起作用,只会惹恼你的用户。

If you are trying to implement some kind of DRM scheme for websites - just dont. They never work and just annoy your users.

远昼 2024-07-14 15:39:45

@1800信息

也许我们可以给斯坦无罪推论? 也许他在某家公司的 IT 部门工作,该部门试图阻止最终用户下载携带病毒的应用程序? 我的意思是,有人可能会尝试实现此类功能,这是出于非邪恶的原因。

如果是这种情况(您在某个公司 IT 部门工作,并且您的任务是阻止人们从互联网下载文件),正如其他人指出的那样,可能有更好的方法来实现您想要实现的目标。

假设他的老板给他分配了这项杂务,那么这是一个相关的问题。

一种选择(但在大多数 IT 环境中可能不受欢迎)是转储 IE 并使用开源浏览器,您可以在其中简单地修改源代码以删除“另存为...”选项。 但是,正如我所说,除非情况发生巨大变化,否则大多数企业 IT 部门绝不会考虑放弃 IE 而转而使用其他浏览器。

@1800 INFORMATION

Maybe we could give Stan the benefit of the doubt? Maybe he's working for some corporate IT department that's trying to prevent end-users from downloading virus-laden apps? I mean there are non-evil reasons why someone might try to implement this sort of functionality.

If this is the case (you're working for some Corporate IT department and you've been tasked with preventing people from downloading files from the internet) as others have pointed out there may be better approaches to what you're trying to achieve.

Assuming he has been tasked with this chore by his bosses, it's a relevant question.

One option (but one that would probably not be palatable in most IT environments) would be to dump IE and use an open source browser where you could simply modify the source to remove the "Save As..." option. But, as I said, unless things have changed dramatically, most corporate IT departments would never consider dropping IE in favor of another browser.

池木 2024-07-14 15:39:45

没有。

(这部分只是因为答案最小大小限制)

Nope.

(this part is just because of the answer minimum size limit)

辞取 2024-07-14 15:39:45

更好地描述你为什么要尝试这样做会很有帮助。 例如,禁用菜单项不会阻止人们下载文档。 他们点击的任何文件链接仍然会出现在临时 Internet 文件中。

在逐页的基础上,您可以使用 Javascript 捕获右键单击事件,并拒绝锁定菜单,但即使是中等熟练的用户也可以轻松解决此问题。

A better description of why you're trying to do this would be helpful. Disabling the menu item won't keep people from downloading documents, for example. Any file links they click are still going to end up in Temporary Internet Files.

On a page-by-page basis, you can use Javascript to trap the right-click event, and refuse to shoe the menu, but that's easily worked around by even moderately-sophisticated users.

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