[RESOLU] fonction readstring registry
Posté : 03 avr. 2025 - 11:01
Bonjour,
j'ai un soucis pour aller lire une registry spécifique :
Arrivez-vous à lancer cette commande ?
Moi j'ai toujours un résultat vide.
La commande fonctionne pourtantsur arborescence supérieure par exemple
De même, si j'utilise reg_key_exists la fonction a un retour particulier :
Renvoie True
mais
Renvoie
Une idée de ce comportement ?
Merci !
Bonne journée,
j'ai un soucis pour aller lire une registry spécifique :
Arrivez-vous à lancer cette commande ?
Code : Tout sélectionner
registry_readstring(HKEY_LOCAL_MACHINE, 'SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Group Policy\\State\\Machine\\Scripts\\Shutdown\\0\\0','Script')
La commande fonctionne pourtantsur arborescence supérieure par exemple
Code : Tout sélectionner
registry_readstring(HKEY_LOCAL_MACHINE, 'SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Group Policy\\State\\Machine\\Scripts\\Shutdown\\0','DisplayName')
Code : Tout sélectionner
reg_key_exists(HKEY_LOCAL_MACHINE, 'SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Group Policy\\State\\Machine\\Scripts\\Shutdown\\0')
mais
Code : Tout sélectionner
reg_key_exists(HKEY_LOCAL_MACHINE, 'SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Group Policy\\State\\Machine\\Scripts\\Shutdown\\0\\0')
Code : Tout sélectionner
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "C:\Program Files (x86)\wapt\waptutils.py", line 2786, in reg_key_exists
with reg_openkey_noredir(rootkey, subkeypath):
AttributeError: __enter__
Merci !
Bonne journée,