Bug 31082 - Windows installer no longer adds registry entries with installation details
Summary: Windows installer no longer adds registry entries with installation details
Alias: None
Product: Installers
Classification: Mono
Component: General ()
Version: 4.2.0 (C6)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Alexander Köplinger [MSFT]
Depends on:
Reported: 2015-06-12 16:12 UTC by Ryan Boggs
Modified: 2015-11-17 08:34 UTC (History)
4 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Ryan Boggs 2015-06-12 16:12:39 UTC

I recently discovered that the new Mono msi installers no longer adds registry entries that describe the mono installation details, such as version number, installation directory and bin locations.  Was this intentional?  If so, what is the preferred method of automatically detecting mono on a windows system?
Comment 1 Alexander Köplinger 2015-09-20 22:09:03 UTC
I contributed the new MSI installer. It doesn't write any registry keys anymore (partly intentional because frankly I thought most of them weren't useful).

You should be able to detect whether Mono is installed via the MSI database, e.g. http://stackoverflow.com/questions/4753051/how-do-i-check-if-a-particular-msi-is-installed.

This may not be ideal and adding registry key for at least version and install directory sounds like a good idea. Would that be enough for your use cases?
Comment 2 Ryan Boggs 2015-09-21 00:57:23 UTC
Hi Alexander,

I checked the info in the MSI database and it doesn't have everything I need. :(

The version and installation directory would be great.  There are some more things that I need, I've listed the old reg keys I used to find before.  However, I have a feeling that there may be some simple logic I can use instead as long as I can get the install directory.  If you have any ideas on how to find the info listed below, it would be greatly appreciated.

* DefaultClr
* SdkInstallRoot
* FrameworkAssemblyDirectory
* MonoConfigDir

Thanks in advance,
Comment 3 Alexander Köplinger [MSFT] 2015-10-06 10:47:43 UTC
I added the following registry keys with https://github.com/mono/release/pull/2 (it'll show up in the next Mono release):

 - Installed
 - Version
 - SdkInstallRoot
 - FrameworkAssemblyDirectory
 - MonoConfigDir

DefaultClr doesn't make sense since with the MSI based installer we only support one Mono installation.
Comment 4 Alexander Köplinger [MSFT] 2015-11-17 08:34:32 UTC
This is now available in Mono 4.2.

FYI as Mono on Windows is a 32bit app, the real registry key is HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Mono on 64bit Windows.