There's a snap-in CA that Wix offers, but I believe it's for powershell, not
MMC.  I couldn't get it to work for me in any evet for the MMC stuff.  I
have a managed code MMC 3.0 snap in that I install.   You have to make the
registry entries yourself using the snap-in's COM guid.  You will also need
to be aware of the 64/32 bit boundary for your installer.  If it's a manged
code SnapIn, you should register it in the 64 & 32 bit registry in a 64 bit
installer.

Here's a cut up sample from my installer.   It's in a merge module, so
you'll note the use of [MergeRedirectFolder] instead of [TargetFolder] or
whatever you'll use in an .msi project.  Also, note the FX: prefix to the
snap in guid, this is only required for snapins written in .NET.

<Component Id="ms_Native_RegistryOperations" Guid="{YOUR_COMPONENT_GUID}"
Win64="yes">
    <RegistryKey Root="HKLM"
Key="SOFTWARE\Microsoft\MMC\SnapIns\FX:{SNAPIN_COM_GUID}"
Action="createAndRemoveOnUninstall" />
    <RegistryKey Root="HKLM"
Key="SOFTWARE\Microsoft\MMC\SnapIns\FX:{SNAPIN_COM_GUID}\NodeTypes"
Action="createAndRemoveOnUninstall" />
    <RegistryKey Root="HKLM"
Key="SOFTWARE\Microsoft\MMC\SnapIns\FX:{SNAPIN_COM_GUID}\Standalone"
Action="createAndRemoveOnUninstall" />
    <RegistryValue Root="HKLM"
Key="SOFTWARE\Microsoft\MMC\SnapIns\FX:{SNAPIN_COM_GUID}" Name="Type"
Value="SampleSnapIn.SampleSnapIn, SampleSnapIn, Version=0.0.0.1,
Culture=neutral, PublicKeyToken=ee359021a7bf4bed" Type="string"
Action="write" />
    <RegistryValue Root="HKLM"
Key="SOFTWARE\Microsoft\MMC\SnapIns\FX:{SNAPIN_COM_GUID}"
Name="ApplicationBase" Value="[MergeRedirectFolder]" Type="string"
Action="write" />
    <RegistryValue Root="HKLM"
Key="SOFTWARE\Microsoft\MMC\SnapIns\FX:{SNAPIN_COM_GUID}"
Name="ConfigurationFile" Value="[#SampleSnapIn.dll.config]" Type="string"
Action="write" />
    <RegistryValue Root="HKLM"
Key="SOFTWARE\Microsoft\MMC\SnapIns\FX:{SNAPIN_COM_GUID}" Name="NameString"
Value="Sample MMC 3.0 SnapIn" Type="string" Action="write" />
    <RegistryValue Root="HKLM"
Key="SOFTWARE\Microsoft\MMC\SnapIns\FX:{SNAPIN_COM_GUID}" Name="Description"
Value="MMC 3.0 snap-in sample." Type="string" Action="write" />
    <RegistryValue Root="HKLM"
Key="SOFTWARE\Microsoft\MMC\SnapIns\FX:{SNAPIN_COM_GUID}" Name="Provider"
Value="triCerat, Inc. (c)" Type="string" Action="write" />
    <RegistryValue Root="HKLM"
Key="SOFTWARE\Microsoft\MMC\SnapIns\FX:{SNAPIN_COM_GUID}"
Name="AssemblyName" Value="SampleSnapIn" Type="string" Action="write" />
    <RegistryValue Root="HKLM"
Key="SOFTWARE\Microsoft\MMC\SnapIns\FX:{SNAPIN_COM_GUID}" Name="ModuleName"
Value="SampleSnapIn.dll" Type="string" Action="write" />
    <RegistryValue Root="HKLM"
Key="SOFTWARE\Microsoft\MMC\SnapIns\FX:{SNAPIN_COM_GUID}"
Name="RuntimeVersion" Value="v2.0.50727" Type="string" Action="write" />
    <RegistryValue Root="HKLM"
Key="SOFTWARE\Microsoft\MMC\SnapIns\FX:{SNAPIN_COM_GUID}" Name="FxVersion"
Value="3.0.0.0" Type="string" Action="write" />
    <RegistryValue Root="HKLM"
Key="SOFTWARE\Microsoft\MMC\SnapIns\FX:{SNAPIN_COM_GUID}" Name="About"
Value="{00000000-0000-0000-0000-000000000000}" Type="string" Action="write"
/>
    <RegistryValue Root="HKLM"
Key="SOFTWARE\Microsoft\MMC\SnapIns\FX:{SNAPIN_COM_GUID}"
Name="NameStringIndirect"
Value="@[MergeRedirectFolder]SampleSnapIn.Resources,-1" Type="string"
Action="write" />
    <RegistryValue Root="HKLM"
Key="SOFTWARE\Microsoft\MMC\SnapIns\FX:{SNAPIN_COM_GUID}"
Name="DescriptionStringIndirect"
Value="@[MergeRedirectFolder]SampleSnapIn.Resources,-2" Type="string"
Action="write" />
    <RegistryValue Root="HKLM"
Key="SOFTWARE\Microsoft\MMC\SnapIns\FX:{SNAPIN_COM_GUID}"
Name="IconIndirect" Value="@[MergeRedirectFolder]SampleSnapIn.Resources,-1"
Type="string" Action="write" />
</Component>

I'm not positive which Values are strictly required and not, so you can
experiment with which ones you need to use.  Also, Ideally, I'd have the
assembly binding use the version of the included .dll, but I haven't
researched exactly what I need to do to have that keep up automatically.

Regarding how to install a shortcut to the snapin, that's a little bit more
work.   You need to create a console file (.msc) that references your snap
in.  Then, include that in your install, probably dropping it in your
program files folder, then, you create a shortcut to the .msc file in the
user's start menu...  or even better for an MMC console, in the
administrative tools folder.  this shortcut is done up like any other file
shortcut.  you can find many tutorials online and in the docs for it.


Hope this helps!


On Wed, Jul 23, 2008 at 11:24 AM, Paul Adams <[EMAIL PROTECTED]>
wrote:

> Hi All,
>
> Does anyone know the syntax to register a particular DLL automatically with
> a MMC (as a snapin)? I know the DLL works correctly as a snapin - if you
> register it manually it works correctly.
>
>
> Also, how to create a shortcut to this MMC snapin in the start manu?
>
> Kind Regards,
>
> Paul
>
> Paul Adams
>
> Systems Developer
>
> Agresso Limited
>
>
>
> Riverside House
>
> Direct
>
> +44 (0) 1792 524 530
>
> Normandy Road
>
> Switchboard
>
> +44 (0) 1792 524 524
>
> Swansea
>
> Fax
>
> +44 (0) 1792 524 525
>
> SA1 2JA
>
> www.agresso.com<http://localhost:3804/Desktop/www.agresso.com>
> ERP...with NO Expiry Date(tm)
>
>
>
>
> ------------------------------------------------------------------------------------
> This email is from Agresso Limited.  Its contents, including any
> attachments, are confidential to the person or business to which it is
> addressed.  If you are not the intended recipient you may not read, copy, or
> make any other use of this email or its contents.  If received in error,
> please tell the sender immediately and then delete it from your system.
>  Thank you.
>
> Any opinions expressed in this email are not necessarily those of Agresso
> Limited.
>
> Although we have taken steps to ensure that this email and any attachments
> are virus free, neither Agresso Limited or the sender accepts any
> responsibility for viruses, it is your responsibility to scan the email and
> attachments to ensure they are actually virus free.
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to