+++ This bug was initially created as a clone of Bug #692394 +++ Description of problem: inspect-list-applications cannot detect applications installed in x64-based Windows image, whereas it works for 32 bit Win. Taking the xenpv driver as an example, I installed xenpv on a 32 bit Windows 2003 image from inside the guest, and guestfish successfully could detect it: ... [2] = { app_name: Red Hat Paravirtualized Xen Drivers for Windows(R) app_display_name: Red Hat Paravirtualized Xen Drivers for Windows(R) 1.3.4-1 app_epoch: 0 app_version: 1.3.4-1 app_release: app_install_path: app_trans_path: app_publisher: Red Hat, Inc. app_url: http://www.redhat.com app_source_package: app_summary: app_description: } But when we come to the 64 bit Windows, we get nothing from the output. Version-Release number of selected component (if applicable): libguestfs-1.7.17-16.el6 How reproducible: Always Steps to Reproduce: 1. Setup a x64-based Windows image. Boot into the guest using KVM or Xen, and install some applications like xenpv driver. 2. Quit the guest and use guestfish to detect the installed application. guestfish -a windows-64bit.img ... ><fs> inspect-os /dev/vda1 ><fs> inspect-get-mountpoints /dev/vda1 /: /dev/vda1 ><fs> mount /dev/vda1 / ><fs> inspect-list-applications /dev/vda1 ><fs> Actual results: No output. Expected results: Descriptions of installed applications. Additional info: I think you need to look for some registry key other than HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall for the 64 bit Windows. This page might help: http://support.microsoft.com/kb/896459 --- Additional comment from jzheng on 2011-03-31 04:56:47 EDT --- OH, I think the xenpv driver is a 32-bit program that run in WOW64 mode. It should be found in HKEY_LOCAL_MACHINE\Software\WOW6432node. I did not try the native 64-bit program case, which I'll later have a test. --- Additional comment from rjones on 2011-03-31 05:01:19 EDT --- Could you attach the HKLM\SOFTWARE hive from this windows guest to the bug? Do: $ guestfish --ro -a windows-64bit.img -i \ download win:/windows/system32/config/software software $ file software software: MS Windows registry file, NT/2000 or above Those commands should produce a binary file called 'software' in the current directory which you can just attach. --- Additional comment from jzheng on 2011-03-31 05:21:22 EDT --- Created attachment 489012 [details] Compressed hive file of the Windows image I compressed the hive file. It's from a Windows 7 x64 image. Well, I tried the 7zip 64bit version, and it was correct. ><fs> inspect-list-applications /dev/vda1 [0] = { app_name: {23170F69-40C1-2702-0920-000001000000} app_display_name: 7-Zip 9.20 (x64 edition) app_epoch: 0 app_version: 9.20.00.0 app_release: app_install_path: app_trans_path: app_publisher: Igor Pavlov app_url: http://www.7-zip.org/ app_source_package: app_summary: app_description: } Then it's a 32bit-on-64bit issue. --- Additional comment from jzheng on 2011-03-31 05:26:58 EDT --- Created attachment 489013 [details] Second version of hive file that contains 64bit 7-zip installed The hive file on which I performed the test with 64 bit 7-zip.
Thanks Jinxin; I have pushed a fix for this upstream. I tested it using the two software hives and it was able to detect both applications correctly. http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=64bc4495031a1942472038db7aee0bf3b746949d