MS Agents & Delphi

Posted on 2009-02-19
Last Modified: 2012-05-06

    I Added the TAgent ActiveX Control to my Delphi 2009 , and applied to into my Application, Everything working fine.
  I tried to run my Application on another machine, I got an error because MS Agents is not installed on this machine.

  is There anyway by Delphi code To check if Agents installed or not, and if not installed, install them.

  Or can make Agents Embeded in my EXE and no need to install MS Agents?
Question by:i7mad
    LVL 6

    Expert Comment

    you can check if office is intalled  

    add Registry to uses

      Reg: TRegistry;
      Reg := TRegistry.Create;
        Reg.RootKey := HKEY_CLASSES_ROOT;
        if Reg.KeyExists('Word.Application')  then  // office is installed -  load agent
        else      do_something;                             // office is NOT installed


    Author Comment

    Thanks bokist

       Ok Guys, What about the answer of the second part of my question (possibility to install MS Agent on machines that does not have MS Agent installed) ?

     Or make MS Agents included with my Application Exe? (if possible) ?

    Author Comment

    I mean by saying (possibility to install MS Agent on machines that does not have MS Agent installed)  : Installing them through my Application, not Microsoft installer itself.
    LVL 26

    Accepted Solution

    See this page: (Installing MSAgent )

    and this page: (Installing MSAgent Characters)

    You should include the installs with your own installation program and run them if
    tey haven't been installed.

    To check if it is installed, check for the existence of this DLL:

    Modify %WINDOWS% to match the User's Windows directory you would get from
    the system using a GetWindowsDirectory function call.
    LVL 6

    Expert Comment

    I am using MS Agent also in my applications.
    As far as I know MS Agent is part of MS Office.
    Please keep on mind, that MS Agent files are located in different folders depending on office versions.

    Author Closing Comment


    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
    In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now