如何触发提升提示 [英] How to trigger the elevation prompt

查看:81
本文介绍了如何触发提升提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们开发了一个应用程序,其setup.exe会自动获取"提升 提示"。当用户不是管理员组的成员时,在屏幕上。使用Installshield进行设置,并输入一些检查
管理员权限的代码。

We develop an application whose setup.exe automatically gets me the "elevation  prompt" on the screen when the user is not member of an administrator's group. The setup is made with Installshield, and that puts in some code which checks the admin rights.

该应用程序附带一个dot net 4 / c#built updater,目前不支持请求提升提示并取决于"用户帐户控制"的方式。设置是更新有时会进入"虚拟商店",这在终端服务器上是致命的
。 

The application comes with a dot net 4 / c# built updater that currently does NOT ask for an elevation prompt and depending how the "user account control" settings are the update sometimes goes into the "virtual store", which is fatal on Terminal servers. 

setup.exe在其中有一个选项" ALLUSERS等于1英寸; - 这意味着该应用程序可供PC的所有用户使用,并且没有选项将其设置为"为当前用户安装"。 

The setup.exe has an option inside of it "allusers=1" - that means the app is available for all users of a PC, and there is no option to set this to "install for current user". 

现在的问题 - 做什么我必须添加到我们的"updater.exe"中。它也要求提升?

Now the question - what do I have to add to our "updater.exe" that it asks for an elevation too?

IT架构师 - 终端服务器,虚拟化,SQL服务器,文件服务器,WAN网络以及与软件开发密切相关(8)多年+ VB,C ++和脚本语言经验),SQL服务器MCP和Xenapp 6.5 CCAA

IT architect - Terminal servers, virtualizations, SQL servers, file servers, WAN networks and closely related to software devleopment (8 years + experience in VB, C++ and script langugaes), MCP for SQL server and CCAA for Xenapp 6.5

推荐答案

>现在的问题是 - 我必须添加到我们的"updater.exe"中。它也要求提升?

>Now the question - what do I have to add to our "updater.exe" that it asks for an elevation too?

你的应用程序需要有一个需要管理员的清单。

Your application needs to have a manifest with requireAdministrator.

http://stackoverflow.com/questions/2818179/how-do -i-force-my-net-application-to-run-as-administrator

Dave


这篇关于如何触发提升提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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