![python](https://habrastorage.org/r/w120/webt/67/53/2d/67532dddd34eb598991451.png)
Python
- 3 ответа
- 0 вопросов
2
Вклад в тег
import subprocess
keyPath = r'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI'
output = subprocess.run(
['reg', 'query', keyPath, '/reg:64', '/v', 'LastLoggedOnDisplayName'],
stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding='cp866')
print('stdout:', output.stdout)
print('stderr:', output.stderr)