Windows – 如何在Visual Basic 6.0中创建清单文件?
我想在VB 6.0中创建一个清单文件.当我启动应用程序时,操作系统应该要求用户具有管理员权限.我也想知道如何嵌入应用程序?
您实际上并没有在VB中创建清单文件.
Windows应用程序清单是格式为XML的标准文本文档.您可以在记事本中创建它,并在应用程序的目录(YourAppName.exe.manifest)中保存适当的文件名.
Microsoft还提供了更多的信息:Application Manifests.它甚至包含一个示例清单,您可以将其简单地复制并粘贴到一个空白的文本文件中以开始使用. 重要的是,如果您希望应用程序提示用户标高,则将requestedExecutionLevel设置为requireAdministrator,而不是asInvoker.有关使用UAC的清单的具体信息可用here. 所以一个完整的样本可能看起来像这样: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assemblyIdentity version="1.0.0.0" processorArchitecture="*" name="MyMagicalApplication" type="win32" /> <description>Sample manifest for your super cool application</description> <!-- Request version 6 of the common controls. --> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*" /> </dependentAssembly> </dependency> <!-- Identify the application security requirements. --> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> <security> <requestedPrivileges> <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> </requestedPrivileges> </security> </trustInfo> </assembly> 将清单嵌入到可执行文件中的传统方式是使用 VBAccelerator site还有一些关于在VB 6应用程序中嵌入清单的信息.具体来说,它说:
但是,如果您希望在从VB 6 IDE构建应用程序时自动嵌入清单,那么您将遇到更多困难. VB 6 IDE不支持后期制作步骤,因此您无法在命令行上简单地运行mt.exe来为您执行此操作.有几个在网页上看到的实用程序,声称自动为您自动嵌入清单,但我相信大多数实用程序是只处理请求v6 ComCtl32.dll的旧实用程序.我不知道他们是否容易扩展,以包括UAC权限,但这是值得一提的.这里有一些链接要查看: > http://vb6zone.blogspot.com/2010/07/make-my-manifest.html (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- windows-server-2003 – 如何在Server 2003上无限期地安排任
- 自动安装 – 使用Powershell和Hyper-V无人值守安装Windows
- 在Windows上设置Java进程名称
- windows-server-2012-r2 – 如何调整Windows Server 2012 R
- windows-8 – 如何强制应用程序在Windows 7/8上使用DPI虚拟
- windows-server-2008 – Windows 2008-R2用户重新创建的问题
- windows-server-2008 – 如何知道Windows防火墙上当前打开的
- win10双系统安装 linux(manjaro)记录
- windows – 在FOR循环中使用什么分隔符来读取行?
- windows-xp – GnuPG:“解密失败:秘密密钥不可用”错误从