[Mono-list] Application installation on Windows

Robert Jordan robertj at gmx.net
Thu Aug 31 09:12:18 EDT 2006

Hi Andreas,

Andreas Färber wrote:
> I asked a similar question some time ago, and this issue is simply  
> being ignored. The point is how to detect a Mono installation from a  
> Windows Installer package. For Microsoft .NET this can be determined  
> using the Windows Installer technology itself, and the shortcuts  
> point directly to the .exe, the CLR being integrated into Windows.  
> Both is impossible with Mono.
> a) How does one determine whether Mono is installed somewhere on the  
> system? (registry?)

That's quite easy:

1) lookup the string value

    $version = HKLM_LOCAL_MACHINE\Software\Novell\Mono\DefaultCLR

2) lookup the string value

     $monoprefix =


3) (optional) detect whether $mono-prefix\bin\mono.exe exists.

If one of the steps above failed, Mono is not properly
installed or too old.

> b) How should the shortcut be constructed? (assume Mono will be on  
> the user's path? or determine absolute Mono path somehow?)

Usually the tool (1) which generates the MSI is able to create
icons almost automagically.

The shortcut target is


The shortcut's command line


The shortcut's icon


(1) I can't really recommend one, but have a look at WiX:


Despite of its very misleading name (for Germans ;-),
it's a nice toolkit.

> This lack of information is keeping me from providing a Mono version  
> of my Windows software.
> Another thing is that with Microsoft .NET there's a library  
> InstallUtilLib.dll that can be used as part of a Windows Installer  
> package to run managed Installer classes (e.g. for Firewall  
> configuration) - Installer classes are apparently not available in  
> Mono, no equivalent to InstallUtilLib provided and no workaround  
> published.

This can't be provided, because this would require that
MS.NET is installed on the machine. Otherwise the MSI engine
won't be able to execute the custom actions implemented
by your assemblies.


More information about the Mono-list mailing list