加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

windows – Delphi应用程序清单WinXP和Win7下的文件问题

发布时间:2020-12-14 02:20:05 所属栏目:Windows 来源:网络整理
导读:我的最后一个问题“在Win-7下列出服务和服务状态”使我开始研究一种解决方案,该解决方案基于.manifest文件为我的应用程序提供 Windows Vista以后的管理员权限. 我不确定继续上一个问题,因为它们不一样所以这是另一个问题: 我的应用程序现在在Win 7下工作正
我的最后一个问题“在Win-7下列出服务和服务状态”使我开始研究一种解决方案,该解决方案基于.manifest文件为我的应用程序提供 Windows Vista以后的管理员权限.

我不确定继续上一个问题,因为它们不一样所以这是另一个问题:

我的应用程序现在在Win 7下工作正常,无论我是否因为清单文件而“以管理员身份”运行它.
我的清单文件如下:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <assemblyIdentity version="1.6.0.5" processorArchitecture="X86" name="ServiceMonitorPro" type="win32"/>
  <description publisher="Powershield Ltd" product="Powershield Service Monitor">Powershield Service Monitor</description>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
   <security>
    <requestedPrivileges>
     <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
    </requestedPrivileges>
   </security>
  </trustInfo>
 </assembly>

当应用程序在Windows 7或Vista上运行时,UAC会出现如下对话框:
alt text http://www.freeimagehosting.net/uploads/39787fd3dd.jpg

如何替换“未知”发布者?

另一个也是最大的问题是,即使你的应用程序在Win7或Vista下运行没有问题,在WinXP下它现在崩溃了消息:
“此应用程序无法启动,因为应用程序配置不正确.重新安装应用程序可能会解决此问题.”

Another thing I would like to add: If
I add reference (uses clause) to XPMan
the app works fine on WinXP but then
it my .manifest file makes no
diference under Vista or Win7.

解决方法

我要感谢大家,通过评论或回答让我继续挖掘…

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读