简体   繁体   English

通过mage.exe将应用程序清单文件设置为管理员特权

[英]application manifest file through mage.exe set to administrator privilege

Application using a .dll as reference. 使用.dll作为参考的应用程序。 Initially, the DLL version is 1.2.xx version and its perfect working. 最初,DLL版本是1.2.xx版本,并且可以完美运行。 When I use the updated version of dll (1.3.xx) then it not working. 当我使用dll(1.3.xx)的更新版本时,它不起作用。

Hack: I Open my visual studio as run as administrator then the current version of dll(1.3.xx) is working. 哈克:我run as administrator身份打开Visual Studio,然后当前版本的dll(1.3.xx)正在运行。

Application .net Framework: 4.5 Visual Studio: 2012 应用.net Framework:4.5 Visual Studio:2012

Application creates manifest(application.exe.manifest) through mage.exe . 应用manifest(application.exe.manifest)通过mage.exe创建manifest(application.exe.manifest)

Question: First, Why my application requires the 'run as administrator' privilege for new dll(1.3.xx). 问题:首先,为什么我的应用程序要求新dll(1.3.xx)具有“以管理员身份运行”特权。 Second, How to fix it. 第二,如何解决。

<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
        <!--
          UAC Manifest Options
          If you want to change the Windows User Account Control level replace the 
          requestedExecutionLevel node with one of the following.

        <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
        <requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />
        <requestedExecutionLevel  level="highestAvailable" uiAccess="false" />

         If you want to utilize File and Registry Virtualization for backward 
         compatibility th[![enter image description here][1]][1]en delete the requestedExecutionLevel node.
    -->
        <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
</requestedPrivileges>

在此处输入图片说明

只需将其更改为<requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> ,我们也不知道您的.dll代码/文件,因此如果您未向我们提供有关此问题的足够信息,我们将无济于事。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何删除用Mage.exe / MageUI.exe创建的清单文件节点,而又不会遇到名称空间问题? - How can i remove Nodes of Manifest-File created with Mage.exe/MageUI.exe without getting trouble with the namespace? Mage.exe不会为4.5生成compatibleFrameworks - Mage.exe doesn't produce compatibleFrameworks for 4.5 如何使用 mage.exe 为 VSTO 辞职清单? - How to use mage.exe to resign manifests for VSTO? 有没有办法使用Mage / MageUI为ClickOnce应用程序清单指定应用程序图标? - Is there a way to specify the application icon for a ClickOnce application manifest using Mage/MageUI? 从法师签名的清单文件中获取X509证书 - Get X509 Certificate from mage signed manifest file WPF 应用程序清单文件 - WPF application manifest file C# 管理员权限 - 检查 - C# administrator privilege - checking 代理UWP组件-管理员权限 - Brokered UWP Component - Administrator privilege UWP应用程序声称它在发行版本期间引用了自己的exe-“清单引用文件”,它不是有效负载的一部分” - UWP application claims it references its own exe during release build - “Manifest references file '' which is not part of the payload” 如何检查 dll 或 exe 文件是否在 C# 中有应用程序清单 - How do I check if dll or exe file has an application manifest in C#
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM