Vista的清单文件 [英] Manifest files for Vista

查看:119
本文介绍了Vista的清单文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于我的产品的某些exe,我需要管理特权.因此,我使用"requireAdministrator"将它们嵌入到我的应用程序中.它在Windows Vista上可以正常工作,并在允许的情况下提示允许/拒绝或管理员uname/密码.

但是同一程序在以前的OS版本(XP,2003 Small business等)上具有不一致的性能.对于嵌入了这些清单文件的应用程序,有时会显示蓝屏.如果嵌入式清单文件也与其他操作系统的exe位于同一目录中,则可以避免出现这些蓝屏.

我不想使我的应用程序依赖于同一目录中清单文件的存在.有出路吗?是否有工具可以找到嵌入式清单文件是否可以在所有以前的OS上正常工作.

还有其他方法可以在Vista上实现提升吗?还是为Vista安装不同的exe更好?

先谢谢您

维卡什

解决方案

这很奇怪,我在运行包含Vista"elevation"的可执行文件时没有问题.

我的清单如下所示:
<?xml version ="1.0" encoding ="UTF-8" standalone =是"?
< assembly
xmlns ="urn:schemas-microsoft-com:asm.v1"
manifestVersion ="1.0" ; assemblyIdentity
processorArchitecture ="x86"
version ="5.6.0.0"
type ="win32"
name ="elevcc.exe"/"
"< ; description>控制中心海拔启动器</description>
< dependency>
< dependentAssembly>
type ="win32" Microsoft Windows名称. .Common-Controls``
version ="6.0.0.0''

publicKeyToken =``6595b64144ccf1df'' ></dependencyAssembly>
</dependency>
< trustInfo xmlns =" urn:schemas-microsoft-com:asm.v3<>
< security>安全性
requestedPrivileges>
< requestedExecutionL evel
级别="requireAdministrator"
uiAccess ="false"/</</</requestedPrivileges>
信息</trust><> ;/assembly>

如果我从构建脚本中正确读取了该文件,则我们正在使用以下命令将清单嵌入到可执行文件中:

mt -nologo -manifest file.manifest fullpath. file.exe -outputresource:fullpath.file.target.exe; id

其中exe的id为1,dll的id为2.

也许您还应该检查是否使用最新版本mt实用程序(来自最新的SDK),尽管我认为这实际上并不重要.


Hi,

For some of the exes of my product, I need administrative privilege. So I embed them in my application with "requireAdministrator". It works fine on Windows Vista and prompts for allow/deny or administrator uname/password as applicable.

But the same program has non consistent performance on previous OS versions(XP, 2003 Small business etc). It shows blue screen sometimes for the applications where these manifest files are embedded. One can avoid these blue screens if the embedded manifest file is also present in the same directory as the exe for other OS.

I do not want to make my application dependant on the presence of manifest file in the same directory. Is there a way out? Is there a tool to find whether an embedded manifest file will work or not on all previous OS.

Is there any other way to achieve the elevation on Vista? Or is it better to have different set of exe for Vista?

Thanking you in advance,

Vikash

 

解决方案

This is strange, I have no problems with running the executables containing Vista "elevation" manifests on former OS and I don't have manifest files in the directory.

My manifests look like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly
   xmlns="urn:schemas-microsoft-com:asm.v1"
   manifestVersion="1.0">
<assemblyIdentity
    processorArchitecture="x86"
    version="5.6.0.0"
    type="win32"
    name="elevcc.exe"/>
    <description>Control Center Elevation Launcher</description>
    <dependency>
    <dependentAssembly>
    <assemblyIdentity
         type="win32"
         name="Microsoft.Windows.Common-Controls"
         version="6.0.0.0"
         publicKeyToken="6595b64144ccf1df"
         language="*"
         processorArchitecture="x86"/>
    </dependentAssembly>
    </dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel
          level="requireAdministrator"
          uiAccess="false"/>
        </requestedPrivileges>
       </security>
  </trustInfo>
</assembly>

If I read it correctly from our build script, then we are using the following command to embed the manifest into executables:

mt -nologo -manifest file.manifest  fullpath.file.exe -outputresource: fullpath.file.target.exe;id

where id is 1 for exe's and 2 for dll's.

Maybe you should also check if you are using the latest version of mt utility (from the latest SDK), although I think that this shouldn't actually matter.


这篇关于Vista的清单文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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