We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5939f88 commit 3b720ffCopy full SHA for 3b720ff
machineid/__init__.py
@@ -84,9 +84,8 @@ def id(winregistry: bool = True) -> str:
84
if platform == 'darwin':
85
id = __exec__("ioreg -d2 -c IOPlatformExpertDevice | awk -F\\\" '/IOPlatformUUID/{print $(NF-1)}'")
86
elif platform in ('win32', 'cygwin', 'msys'):
87
- if winregistry and winregistry is not None:
88
- id = __reg__(r'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography', 'MachineGuid')
89
- else:
+ id = __reg__(r'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography', 'MachineGuid')
+ if not id:
90
id = __exec__("powershell.exe -ExecutionPolicy bypass -command (Get-CimInstance -Class Win32_ComputerSystemProduct).UUID")
91
if not id:
92
id = __exec__('wmic csproduct get uuid').split('\n')[2] \
0 commit comments