gpt4 book ai didi

uac - 启动应用程序时显示 UAC 提示

转载 作者:行者123 更新时间:2023-12-02 02:36:46 26 4
gpt4 key购买 nike

我有一个应用程序需要管理员权限才能执行某些操作。我只想在启动时显示 UAC 提示,然后提升。我不确定该怎么做,但我听说过诸如 list 之类的东西,但在任何地方都看不到明确的答案。

最佳答案

您需要一个需要提升权限的应用程序 list 。这是回答这个问题的博客中的引述:

First, you can create a manifest file by adding an “Application Manifest File” Item to your project (default name: app.manifest), then you can set it through the Application Tab in the Project Properties. If you want to change the Windows User Account Control level in your manifest file, all you need is to set the value of the level attribute of the requestedExecutionLevel node with one of the following:

  • asInvoker (default): the application will run using the current Windows user provileges
  • requireAdministrator: the application requires an Administrator user
  • highestAvailable: highest privileges for the current user will be used

http://dariosantarelli.wordpress.com/2007/11/21/vs2008-embedding-uac-manifest-options/

关于uac - 启动应用程序时显示 UAC 提示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1215443/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com