Compare commits

..

No commits in common. "main" and "hivexregedit-utf16le" have entirely different histories.

2 changed files with 2 additions and 16 deletions

View File

@ -5,12 +5,6 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.1.2] - 2025-07-31
### Changed
- Try several encodings on hivexregedit output
## [1.1.1] - 2025-07-29
### Fixed

View File

@ -266,16 +266,8 @@ def ogListSoftware (disk, par):
if shutil.which ('hivexregedit'):
hive = RegistryLib.ogGetHivePath (mntdir, 'software')
if hive:
cmd1_out_bytes = subprocess.run (['hivexregedit', '--unsafe-printable-strings', '--export', hive, r'\Microsoft\Windows\CurrentVersion\Uninstall'], capture_output=True).stdout
cmd1_out_bytes += subprocess.run (['hivexregedit', '--unsafe-printable-strings', '--export', hive, r'\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall'], capture_output=True).stdout
try:
cmd1_out = cmd1_out_bytes.decode ('utf-16le')
except:
try:
cmd1_out = cmd1_out_bytes.decode ('utf-8')
except:
cmd1_out = cmd1_out_bytes.decode ('latin1')
cmd1_out = subprocess.run (['hivexregedit', '--unsafe-printable-strings', '--export', hive, r'\Microsoft\Windows\CurrentVersion\Uninstall'], capture_output=True, text=True, encoding='utf-16le').stdout
cmd1_out += subprocess.run (['hivexregedit', '--unsafe-printable-strings', '--export', hive, r'\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall'], capture_output=True, text=True, encoding='utf-16le').stdout
out = name = ''
for l in cmd1_out.splitlines():
words = l.split ('"')