C++ 修改HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR
时间: 2023-09-19 09:11:20 浏览: 129
修改USB设备名称
5星 · 资源好评率100%
要修改HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR键的值,可以使用SetRegValue函数。在该函数中,参数一是指定要写入的注册表路径,参数二是指定要写入的键的名称,参数三是指定要写入的值。具体的示例代码如下所示:
SetRegValue(L"SYSTEM\\CurrentControlSet\\Services\\USBSTOR", L"Start", 8);
这段代码将把USBSTOR键下的Start值修改为8。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [C++如何读写注册表](https://blog.csdn.net/barry8865/article/details/77984800)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [Windows系统U盘的检测](https://blog.csdn.net/syscall/article/details/105226794)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文