Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.1, 1.1.1, and 1.1.2

shellext: print installed product id to debug out

Starting to use the Windows installer API functions

Changeset af2543f5be87

Parent 71bd3c259272

by Adrian Buehlmann

Changes to 2 files · Browse files at af2543f5be87 Showing diff from parent 71bd3c259272 Diff from another changeset...

 
10
11
12
 
 
13
14
15
 
877
878
879
 
 
 
 
 
 
 
 
 
 
 
 
880
881
882
 
10
11
12
13
14
15
16
17
 
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
@@ -10,6 +10,8 @@
 #include "TortoiseIconBitmap.h"  #include "ThgVersion.h"   +#include "Msi.h" +  #include <map>    #include "CShellExtCMenu.h" @@ -877,6 +879,18 @@
    TDEBUG_TRACE("CShellExtCMenu::Initialize");   + // get installed MSI product id (for debugging purposes for now) +#ifdef _M_X64 + const char* shellexid = "{59FD2A49-BA62-40CC-B155-D11DB11EE611}"; +#else + const char* shellexid = "{1126CF42-3994-428B-A746-464E1BC680F3}"; +#endif + std::vector<char> product_id(50, 0); + UINT msires = ::MsiGetProductCodeA(shellexid, &product_id[0]); + TDEBUG_TRACE("MSI shellexid: " << shellexid); + TDEBUG_TRACE("MSI msires: " << msires); + TDEBUG_TRACE("MSI installed product id: " << &product_id[0]); +   TDEBUG_TRACEW(   L"---- TortoiseHg shell extension version "   << ThgVersion::get() << L"----"
 
28
29
30
31
 
32
33
34
 
28
29
30
 
31
32
33
34
@@ -28,7 +28,7 @@
  RegistryConfig.obj \   ThgDebug.obj   -LIBS = shlwapi.lib gdiplus.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib +LIBS = shlwapi.lib gdiplus.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Msi.lib  DEFFILE = ShellExt.def