We help IT Professionals succeed at work.

MS Agents & Delphi

i7mad
i7mad asked
on
Medium Priority
176 Views
Last Modified: 2012-05-06
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?
Comment
Watch Question

Commented:
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;

Author

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) ?

Author

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.
All-around developer
CERTIFIED EXPERT
Commented:
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.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Commented:
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

Commented:
:)
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.