MS Agents & Delphi

Hello,

    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?
i7madAsked:
Who is Participating?
 
Eddie ShipmanConnect With a Mentor All-around developerCommented:
See this page: (Installing MSAgent )
http://moosenose.com/MsAgent.htm

and this page: (Installing MSAgent Characters)
http://darronsday.blogspot.com/2007/12/installing-msagent-characters.html


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:
%WINDOWS%\MSAGENT\agentctl.dll

Modify %WINDOWS% to match the User's Windows directory you would get from
the system using a GetWindowsDirectory function call.
0
 
bokistCommented:
you can check if office is intalled  

add Registry to uses

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

0
 
i7madAuthor Commented:
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) ?
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
i7madAuthor Commented:
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.
0
 
bokistCommented:
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.
0
 
i7madAuthor Commented:
:)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.