Include Adobe Acrobat with C# .NET WinForms 2.0 installer

Hello,

I have a requirement to include Adobe Acrobat in the installer for my C# Windows Forms app, which as part of its function manages pdf files.

What is the best way to do this? It should be as seamless as possible.

Many thanks,

Adam.
adam_beAsked:
Who is Participating?
 
adam_beConnect With a Mentor Author Commented:
Ok I managed to get something along the lines of what I wanted by gleening information from http://weblogs.asp.net/scottgu/archive/2007/06/15/tip-trick-creating-packaged-asp-net-setup-programs-with-vs-2005.aspx but obviously for a windows forms app.

Basically I added a dialog with a checkbox referenced to parameter INSTALL_ADOBE_READER and added a custom action as following:
[RunInstaller(true)]
	public class AdobeReaderAction : System.Configuration.Install.Installer
	{
		public override void Install(System.Collections.IDictionary stateSaver)
		{
			base.Install(stateSaver);
			string targetdir = Context.Parameters["targetdir"];
			if (Context.Parameters["install_adobe_reader"] == "1")
			{
				ProcessStartInfo psi = new ProcessStartInfo(targetdir + "AdbeRdr812_en_US.EXE");
				Process proc = Process.Start(psi);
			}
		}
	}

Open in new window

0
 
REA_ANDREWConnect With a Mentor Commented:
Do you want to actually install Adobe Acrobat during the installtion of your app, OR, have Adobe Acrobat the exe distribute with your application?

Andrew
0
 
adam_beAuthor Commented:
I want to install Adobe Acrobat during the installation of my App. I doesn't have to hide the fact that it's being installed just stop the user from having to run two installers, one for the app and one for adobe acrobat.
0
 
adam_beAuthor Commented:
Actually it's Adobe Reader I got that wrong. The free one, anyway.
0
 
REA_ANDREWCommented:
Good Work! :-)
0
All Courses

From novice to tech pro — start learning today.