This instance was upgraded to Heptapod 0.27.2 on 2021-12-08 at 22:00 UTC+1

Commit 10d0cf63 authored by Adrian Buehlmann's avatar Adrian Buehlmann
Browse files

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
parent 98d3136a18a9
......@@ -910,6 +910,19 @@ STDMETHODIMP CShellExtCMenu::Initialize(
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"----"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment