Windows 开发之注册表操作-UAC

本文详细介绍了Windows系统中的注册表,包括注册表的基本概念、常用API函数,如RegCreateKeyEx、RegOpenKeyEx等,并探讨了如何通过修改注册表来控制用户账户控制(UAC)的级别,提供了实现禁用UAC的示例代码。
摘要由CSDN通过智能技术生成

一、 准备工作

1. 概念

 Windows 系统使用注册表来存储系统和应用程序配置数据。很多系统和应用程序重要的 配置的信息都存储在注册表中。注册表是一种以树型结构组织的数据库。树的每一个节点称 作键(key),每个节点可以包含若干子键,键可以存储数据,存储的数据称作键值。一个键 无论其是否有子键,都可以有键值。一个键可以有很多个键值,每个键值都有一个名字,包 含若干数据,所包含的数据类型可以有很多种

注册表键值类型

Value

Type

REG_BINARY

Binary data in any form.

REG_DWORD

A 32-bit number.

REG_DWORD_LITTLE_ENDIAN

A 32-bit number in little-endian format.

REG_DWORD_BIG_ENDIAN

A 32-bit number in big-endian format.

REG_EXPAND_SZ

A null-terminated string that contains unexpanded references to environment variables (for example, "%PATH%"). It will be a Unicode or ANSI string depending on whether you use the Unicode or ANSI functions. To expand the environment variable references, use the ExpandEnvironmentStrings function.

REG_LINK

A null-terminated Unicode string that contains the target path of a symbolic link that was created by calling the RegCreateKeyEx function with REG_OPTION_CREATE_LINK.

REG_MULTI_SZ

A sequence of null-terminated strings, terminated by an empty string (\0).

The following is an example:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值