Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat are ProductCode & UpgradeCode & GUID? How to detect if certain application/library is already installed on the user machine?
    primarykey
    data
    text
    <p>I've already gone through:</p> <blockquote> <p><a href="https://stackoverflow.com/questions/211192/check-if-the-application-is-already-installed">Check if the application is already installed</a></p> <p><a href="https://stackoverflow.com/questions/488717/detecting-if-a-program-is-already-installed-with-nsis">Detecting if a program is already installed with NSIS</a></p> <p><a href="http://nsis.sourceforge.net/Add_uninstall_information_to_Add/Remove_Programs" rel="nofollow noreferrer">http://nsis.sourceforge.net/Add_uninstall_information_to_Add/Remove_Programs</a></p> </blockquote> <p>My questions are little more in depth and little more general.</p> <p>So, as you understood my problem is that I want to check if "Certain Applications" are already installed on the user's machine? I'm generating the installer using <a href="http://www.advancedinstaller.com" rel="nofollow noreferrer">Advanced Installer</a>.</p> <p>First few questions:</p> <ul> <li>What is <code>Upgrade Code</code>? Advanced installer has option, Product Version (identify by Upgrade Code)</li> <li>What is <code>Product Code</code>? Advanced installer Product Version (identify by Product Code)</li> <li>Component is installed : <code>GUID</code>. What is GUID?</li> </ul> <p>All the above three has values like this: </p> <p>{49EB7A6A-1CEF-4A1E-9E89-B9A4993963E3} I don't know what these values are but it seems that computer is recognizing software using this kind of strange ID. </p> <p>My required applications are </p> <ol> <li>MySQL DBMS</li> <li>MySQL .NET Connector</li> </ol> <p>One fact that I discovered is Upgrade Code &amp; Product Code can be extracted from its "msi installer". So, I extracted these values from the installers &amp; registry.</p> <p><strong>MySQL Server</strong></p> <pre><code>Installer = mysql-5.1.43-win32.msi Upgrade Code = {49EB7A6A-1CEF-4A1E-9E89-B9A4993963E3} Product Code = {0ECED7D8-FF53-4DC9-958E-C2177F528DE4} GUID (for component Installed) = ???? Uninstall Path = HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{0ECED7D8-FF53-4DC9-958E-C2177F528DE4} Installer = mysql-5.1.46-win32.msi Upgrade Code = {49EB7A6A-1CEF-4A1E-9E89-B9A4993963E3} Product Code = {EA8FDE5A-2B33-4EDD-B7E7-8D179DF731A5} GUID (for component Installed) = ???? Uninstall Path = HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{EA8FDE5A-2B33-4EDD-B7E7-8D179DF731A5} Installer = mysql-essential-5.1.46-win32.msi Upgrade Code = {49EB7A6A-1CEF-4A1E-9E89-B9A4993963E3} Product Code = {AD33AF2C-6485-4106-B012-1D9CDC88A454} GUID (for component Installed) = ???? Uninstall Path = HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{AD33AF2C-6485-4106-B012-1D9CDC88A454} Installer = mysql-essential-5.0.89-win32.msi Upgrade Code = {49EB7A6A-1CEF-4A1E-9E89-B9A4993963E3} Product Code = {9A4DA7EF-A7B9-4282-90AD-10976AA24E69} GUID (for component Installed) = ???? Uninstall Path = HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9A4DA7EF-A7B9-4282-90AD-10976AA24E69} </code></pre> <p>Observation from above data:</p> <ul> <li><code>UpgradeCode</code> of a software is constant &amp; is irrespective of its version. But surprisingly there is no single entry in the registry with the value of <code>UpgradeCode</code></li> <li><code>ProductCode</code> is version specific &amp; it is used by the MSI internally which is actually reasonable because. MSI allows applications of different versions to be installed side by side.</li> <li>I don't know how to find GUID.</li> </ul> <p><strong>MySQL ADO .NET Driver</strong> </p> <pre><code>Installer = mysql.data.5.2.5.msi Upgrade Code = --- Product Code = {5FD88490-011C-4DF1-B886-F298D955171B} GUID (for component Installed) = ???? Installer = mysql.data.6.2.2.msi Upgrade Code = --- Product Code = {5FD88490-011C-4DF1-B886-F298D955171B} GUID (for component Installed) = ???? UninstallPath =HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{5FD88490-011C-4DF1-B886-F298D955171B} Installer = mysql.data.6.2.3.msi Upgrade Code = --- Product Code = {5FD88490-011C-4DF1-B886-F298D955171B} GUID (for component Installed) = ???? </code></pre> <p>Observations from above data:</p> <ul> <li>surprisingly, it couldn't find UpgradeCode from installer of mysql.data.*.msi. I wonder why? This contradicts with my above observation.</li> <li><code>ProductCode</code> for all different versions is same here. This again contradicts my above observations.</li> <li>I still don't know how to find GUID.</li> </ul> <p>Now, </p> <ul> <li>What exactly are these <code>ProductCode</code> &amp; <code>UpgradeCode</code> &amp; <code>GUID</code>. </li> <li>Which denotes what? </li> <li>Why are above observations contradicting?</li> <li>I don't care about versions. <em>I don't want to depend on Application Name</em> then how do I check if MySQL driver &amp; MySQL ADO .NET.</li> <li>Does detection become simple if they are .NET assemblies? How to do then? I don't want to ship the assemblies with my deployed files.</li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload