title: MSI Get Installed Property Value C++
body: <p><br /> 
  I have property MYPATH in my MSI setup and I am installing some components to this path. Now I want to get the path where is my component installed. I am using following code:</p>
  
  <pre><code>INSTALLUILEVEL pervousUILevel = MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
  MSIHANDLE handle = NULL;
  MsiOpenProduct(productCode,&amp;handle);
  wchar_t myPath[2048];
  DWORD dwBuffer = 2048;
  MsiGetProductProperty(handle, L"MYPATH", myPath, &amp;dwBuffer); 
  MsiCloseHandle(handle);
  MsiSetInternalUI(pervousUILevel, NULL);
  </code></pre>
  
  <p>But I am still getting the default value "C:\MyDefaultPath" instead of "C:\The Path I Specified During The Installation". What am I doing wrong? <br /> 
  Thanks <br />
  <br /> 
  Edit: <br /> 
  I found out that the code: </p>
  
  <pre><code>wchar_t myPath[4096];
  DWORD isBuffer = 4096;
  MsiGetComponentPath(productCode, L"{component-guid}", myPath, &amp;isBuffer);
  </code></pre>
  
  <p>Also returns the default path.  </p>