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

dotNetInstaller - Setup Bootstrapper for .NET Application

, 4 Jan 2004
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>
	/// installedcheck of type check_registry_value
	/// </summary>
	public class installedcheck_registry : installedcheck
	{
		public installedcheck_registry():base("check_registry_value")
		{
			m_path = "SOFTWARE\\MyCompany\\MyApplication\\1.0.1.0";
			m_comparison = installcheck_comparison.match;
			m_fieldname = "Installed";
			m_fieldtype = installcheck_registrytype.REG_DWORD;
			m_fieldvalue = "1";
		}

		private string m_path;
		[Description("Specifies the registry path to search for the registry value specified, must be a path under HKEY_LOCAL_MACHINE like 'SOFTWARE\\MyCompany'. (REQUIRED)")]
		public string path
		{
			get{return m_path;}
			set{m_path = value;}
		}

		private string m_fieldname;
		[Description("The registry field name in the specified path, for example 'Installed'. (REQUIRED)")]
		public string fieldname
		{
			get{return m_fieldname;}
			set{m_fieldname = value;}
		}

		private string m_fieldvalue;
		[Description("The registry value used to check if the component is installed, this value is converted based on the value type specified. (REQUIRED)")]
		public string fieldvalue
		{
			get{return m_fieldvalue;}
			set{m_fieldvalue = value;}
		}

		private installcheck_registrytype m_fieldtype;
		[Description("Specifies the type of the registry field, can be 'REG_DWORD' (for numeric value) or 'REG_SZ' (for string value). (REQUIRED)")]
		public installcheck_registrytype fieldtype
		{
			get{return m_fieldtype;}
			set{m_fieldtype = value;}
		}

		private installcheck_comparison m_comparison;
		[Description("Comparison mode; can be 'match' to check if the exact value is present in the registry or 'version' to compare the registry version with the specified version and return true if the registry version is equal or greater then the version specified. (REQUIRED)")]
		public installcheck_comparison comparison
		{
			get{return m_comparison;}
			set{m_comparison = value;}
		}

		protected override void OnXmlWriteTaginstalledcheck(XmlWriterEventArgs e)
		{
			base.OnXmlWriteTaginstalledcheck (e);

			e.XmlWriter.WriteAttributeString("path",m_path);
			e.XmlWriter.WriteAttributeString("fieldname",m_fieldname);
			e.XmlWriter.WriteAttributeString("fieldvalue",m_fieldvalue);
			e.XmlWriter.WriteAttributeString("fieldtype",m_fieldtype.ToString());
			e.XmlWriter.WriteAttributeString("comparison",m_comparison.ToString());
		}


		protected override void OnXmlReadTaginstalledcheck(XmlElementEventArgs e)
		{
			base.OnXmlReadTaginstalledcheck (e);

			if (e.XmlElement.Attributes["path"] != null)
				m_path = e.XmlElement.Attributes["path"].InnerText;

			if (e.XmlElement.Attributes["fieldname"] != null)
				m_fieldname = e.XmlElement.Attributes["fieldname"].InnerText;

			if (e.XmlElement.Attributes["fieldvalue"] != null)
				m_fieldvalue = e.XmlElement.Attributes["fieldvalue"].InnerText;

			if (e.XmlElement.Attributes["fieldtype"] != null)
				m_fieldtype = (installcheck_registrytype)Enum.Parse(typeof(installcheck_registrytype),e.XmlElement.Attributes["fieldtype"].InnerText, true);

			if (e.XmlElement.Attributes["comparison"] != null)
				m_comparison = (installcheck_comparison)Enum.Parse(typeof(installcheck_comparison),e.XmlElement.Attributes["comparison"].InnerText, true);

		}
	}

	public enum installcheck_registrytype
	{
		REG_DWORD,
		REG_SZ
	}
}

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 | Mobile
Web03 | 2.8.140926.1 | Last Updated 5 Jan 2004
Article Copyright 2003 by Davide Icardi
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid