Vista / 7的UAC:如何降低进程权限 [英] Vista/7 UAC: how to lower process privileges

查看:234
本文介绍了Vista / 7的UAC:如何降低进程权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能为一个过程,自己从高架UAC权限降低到标准的用户?如果没有可以提升的过程中推出使用标准用户令牌副本,然后杀了自己?任何代码示例(C#首选)

Is it possible for a process to lower itself from elevated UAC permission back to standard user? If not can the elevated process launch its copy with standard user token and then kill itself? Any code examples (C# preferred)?

详细内容:

问题:
- 用户安装我的产品(C#编写)
- 安装程序提升了UAC权限ADMIN
- 在结束安装程序启动我的exe
- exe文件将继承高架从管理
组 - exe文件挂载的网络驱动器这在Windows资源管理器(与普通权限运行)

Problem: - user installs my product (written in C#) - the installer elevates its UAC permission to admin - at the end the installer launches my exe - the exe inherits elevated permissions from admin - the exe mounts network drives which become invisible in Windows Explorer (that runs with regular permissions)

成为无形选项我认为:
1)破安装到外的exe和内部的exe ,即以提升权限运行。安装由1000+行NSIS代码,我不知道NSIS
2)以较低的权限安装驱动器的任何东西。如果我这样做是赢Explorer可以看到驱动器,但我的exe文件不能
3)设置EnableLinkedConnection注册表选项为1。这是一个没有去,因为它需要在安装过程中电脑自动重启。

Options I considered: 1) break installer into outer exe and inner exe, that runs with elevated permission. The install consists of 1000+ lines of NSIS code and I don't know anything about NSIS 2) mounting drives with lower permissions. If I do it Win Explorer can see the drives but my exe cannot 3) setting EnableLinkedConnection registry option to 1. This is a no-go because it requires PC reboot during the installation.

请帮帮忙!

谢尔盖

推荐答案

方式一: http://www.codeproject.com/KB/vista-security /VistaElevator.aspx

另一种方法(在最近一篇文章中大部分评论中提及)的 http://brandonlive.com/2008/04/27/获得最壳到运行的应用程序适合你部分-2技术/

Another way (mentioned in most recent comment in previous article): http://brandonlive.com/2008/04/27/getting-the-shell-to-run-an-application-for-you-part-2-how/

这篇关于Vista / 7的UAC:如何降低进程权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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