Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

dotNetInstaller - Setup Bootstrapper for .NET Application

, 4 Jan 2004 MIT
With this tool the developer can define the application prerequisites and install the correct version of these components in the correct order based on the user operating system type and language, allow the user to download these components from the web or install these components directly.
dotnetinstaller_source.zip
dotNetInstaller_source
dotNetInstaller
dotNetInstaller.vcproj.vspscc
dotNetInstaller.vssscc
mssccprj.scc
res
banner.bmp
dotNetInstaller.ico
dotNetInstaller.manifest
Thumbs.db
vssver.scc
Tools
vssver.scc
vssver.scc
InstallerEditor
App.ico
banner.bmp
bin
Release
InstallerEditor.exe
SourceLibrary.dll
vssver.scc
InstallerEditor.csproj.user
InstallerEditor.csproj.vspscc
InstallerEditor.suo
InstallerEditor.vssscc
mssccprj.scc
References
SourceLibrary.dll
vssver.scc
Thumbs.db
vssver.scc
Sample
banner.bmp
dotNetInstaller.exe
SupportFiles
DataAccess
Jet
Jet40Sp7
Win2000_English
Win2000_Italiano
Win9x_NT
WinME
WinXp_English
WinXp_Italiano
MDAC2.7Sp1Refresh
Win_98_ME_NT_2000
dotNet
v1.1
English
Italiano
InternetExplorer
IE60SP1_English
IE60SP1_Italiano
ServicePack
2000_SP4_English
2000_SP4_Italiano
NT4_SP6a_English
NT4_SP6a_Italiano
Win98_Y2k_Update_English
Win98_Y2k_Update_Italiano
using System;
using System.Xml;
using System.ComponentModel;

namespace InstallerEditor
{
	/// <summary>
	/// Summary description for Download.
	/// </summary>
	public class Download : IXmlClass
	{
		public Download():this("APP_TEMP_DOWNLOADPATH")
		{
		}
		public Download(string p_DownloadPath)
		{
			m_componentname = "New Component";
			m_sourceurl = "http://www.yourwebsite.com/SetupX/Setup.exe";
			m_destinationpath = "#TEMPPATH\\" + p_DownloadPath;
			m_destinationfilename = "";
		}

		private string m_componentname;
		[Description("The description of the file to download. (REQUIRED)")]
		public string componentname
		{
			get{return m_componentname;}
			set{m_componentname = value;OnComponentNameChanged(EventArgs.Empty);}
		}

		private string m_sourceurl;
		[Description("The complete source path of the file to download. For example 'http://www.yourwebsite.com/SetupX/Setup.exe' . Must be URL with http:// or ftp:// protocol (REQUIRED)")]
		public string sourceurl
		{
			get{return m_sourceurl;}
			set{m_sourceurl = value;}
		}

		private string m_destinationpath;
		[Description("The complete destination path where the application copy the sourceurl file. Is recommended to use the TEMP path for destination like this: '#TEMPPATH\\APPLICATION_NAME' . Can contains path constant (see Help->Path Constant). (REQUIRED)")]
		public string destinationpath
		{
			get{return m_destinationpath;}
			set{m_destinationpath = value;}
		}

		private string m_destinationfilename;
		[Description("New name of the downloaded file. Leave this value empty to use the same filename of the original filename. (OPTIONAL)")]
		public string destinationfilename
		{
			get{return m_destinationfilename;}
			set{m_destinationfilename = value;}
		}


		#region IXmlClass Members

		public void ToXml(XmlWriter p_Writer)
		{
			p_Writer.WriteStartElement("download");

			OnXmlWriteTagDownload(new XmlWriterEventArgs(p_Writer));

			p_Writer.WriteEndElement();
		}

		public void FromXml(XmlElement p_Element)
		{
			OnXmlReadTagDownload(new XmlElementEventArgs(p_Element));
		}
		#endregion


		protected virtual void OnXmlWriteTagDownload(XmlWriterEventArgs e)
		{
			e.XmlWriter.WriteAttributeString("componentname",m_componentname);
			e.XmlWriter.WriteAttributeString("sourceurl",m_sourceurl);
			e.XmlWriter.WriteAttributeString("destinationpath",m_destinationpath);
			e.XmlWriter.WriteAttributeString("destinationfilename",m_destinationfilename);
		}
		protected virtual void OnXmlReadTagDownload(XmlElementEventArgs e)
		{
			if (e.XmlElement.Attributes["componentname"] != null)
				m_componentname = e.XmlElement.Attributes["componentname"].InnerText;

			if (e.XmlElement.Attributes["destinationfilename"] != null)
				m_destinationfilename = e.XmlElement.Attributes["destinationfilename"].InnerText;

			if (e.XmlElement.Attributes["destinationpath"] != null)
				m_destinationpath = e.XmlElement.Attributes["destinationpath"].InnerText;

			if (e.XmlElement.Attributes["sourceurl"] != null)
				m_sourceurl = e.XmlElement.Attributes["sourceurl"].InnerText;
		}

		protected virtual void OnComponentNameChanged(EventArgs e)
		{
			if (ComponentNameChanged!=null)
				ComponentNameChanged(this, e);
		}

		public event EventHandler ComponentNameChanged;
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The MIT License

Share

About the Author

Davide Icardi
Software Developer
Italy Italy
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.141223.1 | Last Updated 5 Jan 2004
Article Copyright 2003 by Davide Icardi
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid