Commits

Adrian Buehlmann committed b5dc923

shellext: show msi install location in debug output

As queried from the Windows installer service using the
Windows Installer MsiGetProductInfo API.

http://msdn.microsoft.com/en-us/library/aa370130(v=VS.85).aspx

  • Participants
  • Parent commits 98d3136

Comments (0)

Files changed (1)

File win32/shellext/CShellExtCMenu.cpp

     TDEBUG_TRACE("MSI msires: " << msires);
     TDEBUG_TRACE("MSI installed product id: " << &product_id[0]);
 
+    DWORD busize = 300;
+    std::vector<char> buf(busize, 0);
+    msires = ::MsiGetProductInfoA(
+        &product_id[0], INSTALLPROPERTY_INSTALLLOCATION, &buf[0], &busize);
+    if (msires == ERROR_SUCCESS)
+    {
+        TDEBUG_TRACE("MSI install location: " << &buf[0]);
+    }
+    else
+    {
+        TDEBUG_TRACE("MSI install location: error " << msires);
+    }
+
     TDEBUG_TRACEW(
         L"---- TortoiseHg shell extension version " 
         << ThgVersion::get() << L"----"