網站首頁 編程語言 正文
運行結果
代碼
import winreg
def read_reg():
location = r"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders"
# 獲取注冊表該位置的所有鍵值
key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, location)
print("\n" + "-"*100 + "\n" + location + "\n" + "-"*100 + "\n")
i = 0
while True:
try:
# 獲取注冊表對應位置的鍵和值
print(winreg.EnumValue(key, i))
i += 1
except OSError as error:
# 一定要關閉這個鍵
winreg.CloseKey(key)
break
if __name__ == '__main__':
read_reg()
原文鏈接:https://blog.csdn.net/u010684603/article/details/107899680
相關推薦
- 2022-04-03 Flutter實現旋轉掃描效果_Android
- 2022-07-04 python?selenium模擬點擊問題解決方案_python
- 2022-01-30 判斷element Ui 表格(el-table)中復選框中的選中狀態
- 2022-08-05 python內置模塊之上下文管理contextlib_python
- 2022-04-20 Selenium?三種等待方式(強制等待、隱式等待、顯示等待)_python
- 2022-09-02 C#實現裝飾器模式_C#教程
- 2023-06-13 C++?ncnn模型驗證精度實現代碼_C 語言
- 2022-07-15 在SQL?Server中使用子查詢更新語句_MsSql
- 最近更新
-
- window11 系統安裝 yarn
- 超詳細win安裝深度學習環境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支