如何访问应用程序数据在IE保护模式(从管理BHO) [英] How to Access AppData in IE Protected Mode (from a Managed BHO)

查看:176
本文介绍了如何访问应用程序数据在IE保护模式(从管理BHO)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写在C#中的IE扩展(BHO)。当在保护模式(IE的这迫使所有分机在低完整性运行新的UAC兼容模式)运行,因为它不能在AppData文件夹访问user.config失败。

I am writing an IE Extension (BHO) in C#. When run in protected mode (IE's new UAC-compliant mode which forces all extensions to run at low-integrity), it fails because it cannot access user.config in the appdata folder.

是否有某种方式来标记文件是由低完整性进程可读?

Is there some way to mark files are readable by lower-integrity processes?

如果做不到这一点,是有一些方法来迫使BHO在中级完整性运行?

Failing that, is there some way to force the BHO to run at medium-level integrity?

如果做不到这一点,是有一些方法来创建它指向AppData的中等诚信档案低完整性文件夹的低完整性符号链接?

Failing that, is there some way to create a low-integrity symlink in the low-integrity folders which points to a medium-integrity file in AppData?

如果做不到这一点,是有一些方法来强制LocalLow文件夹使用user.config文件的应用程序?我如何获得(这不是Environment.SpecialFolder中列出),此文件夹中.NET的路径?我将能够与用户运行的是XP回落或谁把保护模式关闭,而不会失去他们所有的user.config数据?

Failing that, is there some way to force the application to use a user.config file in the LocalLow folder? How do I get the path for this folder in .net (it's not listed under Environment.SpecialFolder)? Will I be able to fall back with users running XP or who turn protected mode off, without losing all their user.config data?

推荐答案

还有一个方法,是不是特别优雅,但你可以开始与中等水平的完整性另一个(经纪人)的过程,可以做脏活,用工控机与它通信。为了使您的生活更轻松,我建议你使用套接字通信,因为它们不需要安全检查这可能会非常棘手,当你有不同的完整性级别进程之间的通信。

There's one approach that is not especially elegant but you can start another (broker)process with medium level integrity which can do the 'dirty work' and use IPC to communicate with it. To make your life easier I would suggest you to use sockets for communication because they don't require security check which can be tricky when you have communication between processes with different integrity levels.

为了跳过UAC警告,当你产生新的过程中,你可以修改BHO注册脚本,并添加一些注册表值会告知IE默默地提升新工艺中等水平。

In order to skip UAC warning when you spawn new process you can modify BHO registration script and add few registry values that will inform IE to silently elevate new process to medium level.

您可以在这里找到更多信息:<一href=\"http://msdn.microsoft.com/en-us/library/bb250462(VS.85).aspx#wpm_elebp\">http://msdn.microsoft.com/en-us/library/bb250462(VS.85).aspx#wpm_elebp

You can find more information here: http://msdn.microsoft.com/en-us/library/bb250462(VS.85).aspx#wpm_elebp

这篇关于如何访问应用程序数据在IE保护模式(从管理BHO)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆