CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    How to Determine MAIL Applications Installed in a System

    Hi,

    How can I Determine what are the MAIL Enabled Applications installed in my System.. Like Suppose In my system If I am having Microsoft Outlook Express , or Exchange Server or any other third party Mail Server Application. I should be able to display all the application in a COMBO BOX.

    Is it possible to know ..

    Regards

    ROBERT



  2. #2
    Join Date
    Sep 1999
    Location
    Red Wing, MN USA
    Posts
    312

    Re: How to Determine MAIL Applications Installed in a System

    Mail Clients are stored in the Registry at HKEY_LOCAL_MACHINE\Software\Clients\Mail, you can use the Registry API to access them, eg.


    private Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (byval hKey as Long, byval lpSubKey as string, phkResult as Long) as Long
    private Declare Function RegEnumKey Lib "advapi32.dll" Alias "RegEnumKeyA" (byval hKey as Long, byval dwIndex as Long, byval lpName as string, byval cbName as Long) as Long
    private Declare Function RegCloseKey Lib "advapi32.dll" (byval hKey as Long) as Long
    private Const HKEY_LOCAL_MACHINE = &H80000002

    private Sub Command1_Click()
    Dim sKey as string * 255
    Dim lRegKey as Long
    Dim iKey as Integer
    Combo1.Clear
    Call RegOpenKey(HKEY_LOCAL_MACHINE, "Software\Clients\Mail", lRegKey)
    While RegEnumKey(lRegKey, iKey, sKey, 255) = 0
    Combo1.AddItem Left(sKey, InStr(sKey, Chr(0)) - 1)
    iKey = iKey + 1
    Wend
    Call RegCloseKey(lRegKey)
    If Combo1.ListCount then Combo1.ListIndex = 0
    End Sub





    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]
    Aaron Young
    Senior Programmer Analyst (Red Wing Software)
    Certified AllExperts Expert

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured