create an process with administrator privilege from service in Vista
来源:互联网 发布:sas数据分析 编辑:程序博客网 时间:2024/04/30 10:30
I did it as the following:
1.Get the session if of the active console user (WTSGetActiveConsoleSessionId)
2.Get the user's token (WTSQueryUserToken),the user has administrator privilege
3.duplicate the token ((DuplicateTokenEx)
4.Get the linked token of ther user token. The linked token has admin privilege.
-----------------------------------------------------------------------------------------------------------------------------------------
TOKEN_LINKED_TOKEN admin;
GetTokenInformation(hUserToken, TokenLinkedToken, &admin, sizeof(TOKEN_LINKED_TOKEN), &len)) ;
HANDLE AdminToken = admin.LinkedToken;
--------------------------------------------------------------------------------------------------------------------------------------------
5. create the user process (createProcessAsUser)
- create an process with administrator privilege from service in Vista
- create process as system privilege
- Administrator Privilege in Mac OS X app
- Elevate application's privilege to Administrator automatically on Vista
- ANR in an IntentService with its own process
- Create an ASP.NET web app in Azure App Service
- How to add an account to administrator group, and get root privilege.
- Create an account in Mysql
- Create an avatar and chat with your friends in rooms you design
- Create process in UNIX like system
- Unable to create an ArcMap Service
- Create an Excel-file with PL/SQL
- BDNtv: Deriving a model from an existing database with ECO II in Delphi 2005
- To create an .edmx file from an existing database
- Process of creating an object in Java
- Starting an Interactive Client Process in C++
- Using a Service Locator to Work with MessageBoxes in an MVVM Application
- Create an RSS feed in Rails Tian
- iPhone开发之文件创建、删除、读取、写入
- 数字电路中关键路径的选取
- 移动IPv6技术的研究及其在Linux环境下的实现
- Linux命令:killall - 杀死指定名字的进程
- C#设计模式之4——单件模式
- create an process with administrator privilege from service in Vista
- 百度面试题
- 系统调用
- 在64位的CentOS上编译32位的程序
- django开发步骤
- windowns系统自动关机
- Linux内存管理基本框架
- qsort排序
- Ubuntu 11.10安装GNOME3: