Vista UAC - 获取应用程序以请求升级任务 [英] Vista UAC - get app to request escalation for a task

查看:65
本文介绍了Vista UAC - 获取应用程序以请求升级任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




如何在程序中请求升级?


我正在开发一个独立的程序,可以也可以作为另一个应用程序的''插件'来支付
。设计其他应用程序的方式,它会在其程序文件中扫描一个

插件文件夹。设置文件的文件夹

包含调用插件需要知道的所有设置

应用程序。


问题当然是权限。在vista下,即使是

管理员帐户也无法在不升级的情况下写入文件夹




所以我该怎么办请求升级,以便我的程序可以将

设置文件保存到其插件文件夹中?现在它只是抛出一个

异常''访问被拒绝''。如果我能得到''

程序试图访问受保护的文件夹......我会很高兴的。他们可以接受的消息类型

。毕竟,它通常只需要完成一次。


现在,如果他们使用''运行

作为管理员'',但我更愿意询问一个函数

,如果它不是工作量的话。

提前感谢任何建议或建议,

-Dave

解决方案



d-42 < db ******** @ gmail.comwrote in message

news:d9 ********************** ************ @ k36g2000 pri.googlegroups.com ...





如何在程序中请求升级?


我正在开发一个独立的程序,它也可以充当插件来

另一个申请。设计其他应用程序的方式,它会在其程序文件中扫描一个

插件文件夹。设置文件的文件夹

包含调用插件需要知道的所有设置

应用程序。


问题当然是权限。在vista下,即使是

管理员帐户也无法在不升级的情况下写入文件夹




所以我该怎么办请求升级,以便我的程序可以将

设置文件保存到其插件文件夹中?现在它只是抛出一个

异常''访问被拒绝''。如果我能得到''

程序试图访问受保护的文件夹......我会很高兴的。他们可以接受的消息类型

。毕竟,它通常只需要完成一次。


现在,如果他们使用''运行

作为管理员'',但我更愿意询问一个函数

而不是,如果它不是一个工作量。


您的程序将使用Vista UAC清单在程序运行时提供所需的

凭证,查找它使用Google。


7月28日,8:56 * pm,Mr。阿诺德" < MR。 Arn ... @ Arnold.comwrote:


" d-42" < db.pors ... @ gmail.comwrote in message


news:d9 ********************* ************* @ k36g2000 pri.googlegroups.com ...



< blockquote class =post_quotes>
如何在程序中请求升级?


我正在开发一个独立的程序,它也可以充当''插件''

另一个应用程序。设计其他应用程序的方式,它会在其程序文件中扫描一个

插件文件夹。设置文件的文件夹

包含调用插件需要知道的所有设置

apps。


问题当然是权限。在vista下,即使是

管理员帐户也无法在不升级的情况下写入文件夹



所以我如何请求升级以便我的程序可以将

设置文件保存到其插件文件夹中?现在它只是抛出一个

异常''访问被拒绝''。如果我能得到''

程序试图访问受保护的文件夹......我会很高兴的。他们可以接受的消息类型

。毕竟,它通常只需要完成一次。


现在,如果他们使用''运行

作为管理员'启动软件,它就有效,但我更愿意在一个函数上询问

,如果它不是一个小工作。



您的程序将使用Vista UAC清单在程序运行时提供所需的

凭据,查找它使用Google。



但是我不希望整个程序需要升级,只需要很少使用的一个

很少使用的功能。我认为这是不可能的?我必须将这个功能分解成自己的可执行文件,并提供一个单独的

清单,要求升级吗?


-regards,

Dave




" d-42" < db ******** @ gmail.comwrote in message

news:3c ********************** ************ @ x29g2000 prd.googlegroups.com ...

7月28日晚上8:56,Mr。阿诺德" < MR。 Arn ... @ Arnold.comwrote:


" d-42" < db.pors ... @ gmail.comwrote in message


news:d9 ********************* ************* @ k36g2000 pri.googlegroups.com ...



< blockquote class =post_quotes>
如何在程序中请求升级?


我正在开发一个独立的程序,它也可以充当''插件''

另一个应用程序。设计其他应用程序的方式,它会在其程序文件中扫描一个

插件文件夹。设置文件的文件夹

包含调用插件需要知道的所有设置

apps。


问题当然是权限。在vista下,即使是

管理员帐户也无法在不升级的情况下写入文件夹



所以我如何请求升级以便我的程序可以将

设置文件保存到其插件文件夹中?现在它只是抛出一个

异常''访问被拒绝''。如果我能得到''

程序试图访问受保护的文件夹......我会很高兴的。他们可以接受的消息类型

。毕竟,它通常只需要完成一次。


现在,如果他们使用''运行

作为管理员'启动软件,它就有效,但我更愿意在一个函数上询问

,如果它不是一个小工作。



您的程序将使用Vista UAC清单在程序运行时提供所需的

凭据,查找它使用Google。



但是我不希望整个程序需要升级,只需要很少使用的一个

很少使用的功能。我认为这是不可能的?我必须将这个功能分解成自己的可执行文件,并提供一个单独的

清单,要求升级吗?


< http://news.softpedia.com/news/Admin-Approval-Mode-in-Windows-Vista-45312.shtml>


< http:// www.computerperformance.co.uk/vista/vista_administrator_activate.htm#Summary_of_Vista_管理员_-_ Super_User_(Hidden_​​Account)>


< http://www.codeproject.com/KB/vista -security / MakingAppsUACAware.aspx>


Hi,

How do I ask for escalation from within a program?

I''m developing a standalone program that can also act as a ''plugin'' to
another application. The way the other app was designed, it scans a
plugin folder in its "program files" folder for settings documents
which contain all the settings it needs to know to call the plug-in
apps.

The problem, of course, is permissions. Under vista, even the
administrator accounts are prevented from writing to the folder
without escalation.

So I how do I request escalation so that my program can save the
settings file to its plugin folder? right now it just throws an
exception ''access denied''. I''d be happy if I could get the ''The
program is trying to access a protected folder..." type of message
that they could just accept. After all, it only normally needs to be
done once.

As it stands now, it works if they launch the software using the ''run
as administrator'', but I''d prefer it to ask on that one function
instead, if its not a buttload of work.

thanks in advance for any suggestions or advice,
-Dave

解决方案


"d-42" <db********@gmail.comwrote in message
news:d9**********************************@k36g2000 pri.googlegroups.com...

Hi,

How do I ask for escalation from within a program?

I''m developing a standalone program that can also act as a ''plugin'' to
another application. The way the other app was designed, it scans a
plugin folder in its "program files" folder for settings documents
which contain all the settings it needs to know to call the plug-in
apps.

The problem, of course, is permissions. Under vista, even the
administrator accounts are prevented from writing to the folder
without escalation.

So I how do I request escalation so that my program can save the
settings file to its plugin folder? right now it just throws an
exception ''access denied''. I''d be happy if I could get the ''The
program is trying to access a protected folder..." type of message
that they could just accept. After all, it only normally needs to be
done once.

As it stands now, it works if they launch the software using the ''run
as administrator'', but I''d prefer it to ask on that one function
instead, if its not a buttload of work.

Your program would use the Vista UAC manifest to provide the needed
credentials during program runtime, look it up use Google.


On Jul 28, 8:56*pm, "Mr. Arnold" <MR. Arn...@Arnold.comwrote:

"d-42" <db.pors...@gmail.comwrote in message

news:d9**********************************@k36g2000 pri.googlegroups.com...

Hi,

How do I ask for escalation from within a program?

I''m developing a standalone program that can also act as a ''plugin'' to
another application. The way the other app was designed, it scans a
plugin folder in its "program files" folder for settings documents
which contain all the settings it needs to know to call the plug-in
apps.

The problem, of course, is permissions. Under vista, even the
administrator accounts are prevented from writing to the folder
without escalation.

So I how do I request escalation so that my program can save the
settings file to its plugin folder? right now it just throws an
exception ''access denied''. I''d be happy if I could get the ''The
program is trying to access a protected folder..." type of message
that they could just accept. After all, it only normally needs to be
done once.

As it stands now, it works if they launch the software using the ''run
as administrator'', but I''d prefer it to ask on that one function
instead, if its not a buttload of work.


Your program would use the Vista UAC manifest to provide the needed
credentials during program runtime, look it up use Google.

But I don''t want the entire program need escalation, just the one
rarely used feature. I take it that''s not possible? That I have to
spin-off the feature into its own executable, and provide a separate
manifest requiring escalation for that?

-regards,
Dave



"d-42" <db********@gmail.comwrote in message
news:3c**********************************@x29g2000 prd.googlegroups.com...
On Jul 28, 8:56 pm, "Mr. Arnold" <MR. Arn...@Arnold.comwrote:

"d-42" <db.pors...@gmail.comwrote in message

news:d9**********************************@k36g2000 pri.googlegroups.com...

Hi,

How do I ask for escalation from within a program?

I''m developing a standalone program that can also act as a ''plugin'' to
another application. The way the other app was designed, it scans a
plugin folder in its "program files" folder for settings documents
which contain all the settings it needs to know to call the plug-in
apps.

The problem, of course, is permissions. Under vista, even the
administrator accounts are prevented from writing to the folder
without escalation.

So I how do I request escalation so that my program can save the
settings file to its plugin folder? right now it just throws an
exception ''access denied''. I''d be happy if I could get the ''The
program is trying to access a protected folder..." type of message
that they could just accept. After all, it only normally needs to be
done once.

As it stands now, it works if they launch the software using the ''run
as administrator'', but I''d prefer it to ask on that one function
instead, if its not a buttload of work.


Your program would use the Vista UAC manifest to provide the needed
credentials during program runtime, look it up use Google.

But I don''t want the entire program need escalation, just the one
rarely used feature. I take it that''s not possible? That I have to
spin-off the feature into its own executable, and provide a separate
manifest requiring escalation for that?

<http://news.softpedia.com/news/Admin-Approval-Mode-in-Windows-Vista-45312.shtml>

<http://www.computerperformance.co.uk/vista/vista_administrator_activate.htm#Summary_of_Vista_ Administrator_-_Super_User_(Hidden_Account)>

<http://www.codeproject.com/KB/vista-security/MakingAppsUACAware.aspx>


这篇关于Vista UAC - 获取应用程序以请求升级任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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