VB使用manifest以支持xp风格和获得管理员权限
来源:互联网 发布:sql server 2017 编辑:程序博客网 时间:2024/06/13 22:20
一、在win6以上系统里获得管理员权限
<?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="X86"
name="IsUserAdmin"
type="win32"/>
<description>Description of your application</description>
<!-- Identify the application security requirements. -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="requireAdministrator"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
二、实现xp风格窗体
<?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="X86"
name="CompanyName.ProductName.YourApp"
type="win32"
/>
<description>Your application description here.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
三、同时支持xp风格和获得管理员权限
<?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="X86"
name="CompanyName.ProductName.YourApp"
type="win32"
/>
<description>Your application description here.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="requireAdministrator"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
1、保存为"主程序名.exe.manifest",
2、另建一"aaa.rc"文件(TXT格式),内容为:"1 24 主程序名.exe.manifest"
3、运行""C:\Program Files\Microsoft Visual Studio\VB98\Wizards\rc.exe" /r aaa.rc",生成"aaa.res"
4、将"aaa.res"导入到工程里。
5、编译,OK
- VB使用manifest以支持xp风格和获得管理员权限
- 使用manifest文件实现XP风格界面
- 使用manifest实现XP风格界面
- 使用manifest实现XP风格界面
- 使用XPStyle.manifest文件实现界面XP风格
- mfc win7获得管理员权限 使用WIN7风格 使用当前系统风格
- VB程序使用管理员权限
- 在VB.NET中使用XP风格界面
- 随笔-解决VB使用XP风格后无法打开问题
- 窗口使用XP风格
- MFC中怎样让应用程序获得或以管理员权限运行
- 将XP风格文件manifest合并到资源文件
- 将XP风格文件manifest合并到资源文件
- VB如何生成WINDOW XP风格界面!
- QT如何通过manifest更改图标和获取UAC管理员权限
- 通过 manifest 获取管理员权限
- 用C#和VB.NET实现VS.NET或Office XP风格的菜单(一)
- 用C#和VB.NET实现VS.NET或Office XP风格的菜单(二)
- mysql的limit优化
- FB的一些概念
- 检查必填项的调用代码示例。
- temp
- 如何在一台机器上安装两个甚至多个版本的EAS服务器?
- VB使用manifest以支持xp风格和获得管理员权限
- 黑马程序员_day04_Java基础之函数、数组
- objective-C多线程NSThread
- BOS常用代码说明
- strus2 配置全局 result 从用户的url中找不到对应的action
- HDU 2039 三角形 判断能否形成三角形
- 金蝶EAS中如何添加人员
- 躲过的总有一天会找回来
- poj 2923 Relocation 状态压缩01背包