import subprocess
current_machine_id = subprocess.check_output('wmic csproduct get uuid').decode().split('\n')[1].strip()
print(current_machine_id)
Running this code with vscode is working fine, But when i create exe file using pyinstaller i get error like this:
Traceback (most recent call last):
File "test.py", line 2, in <module>
File "subprocess.py", line 411, in check_output
File "subprocess.py", line 488, in run
File "subprocess.py", line 753, in __init__
File "subprocess.py", line 1054, in _get_handles
OSError: [WinError 6] The handle is invalid
Any solution will appreciated