Click here to Skip to main content
15,891,033 members
Articles / Desktop Programming / MFC

dotNetInstaller - Setup Bootstrapper for .NET Application

Rate me:
Please Sign up or sign in to vote.
4.96/5 (87 votes)
4 Jan 2004MIT22 min read 1M   2.2K   310  
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.
using System;

namespace InstallerEditor
{
	/// <summary>
	/// Summary description for AppSetting.
	/// </summary>
	public class AppSetting : SourceLibrary.IO.IsolatedStorage.IsolatedStorageSettingVersionBase
	{
		public AppSetting():base(1)
		{
			base.StorageFileName = "InstallerEditorAppSetting.bin";
		}

		private string m_BannerBitmapFile;
		public string BannerBitmapFile
		{
			get{return m_BannerBitmapFile;}
			set{m_BannerBitmapFile = value;}
		}

		private string m_OutputMakeFile;
		public string OutputMakeFile
		{
			get{return m_OutputMakeFile;}
			set{m_OutputMakeFile = value;}
		}
		private string m_TemplateInstallerFile;
		public string TemplateInstallerFile
		{
			get{return m_TemplateInstallerFile;}
			set{m_TemplateInstallerFile = value;}
		}
		private SupportedLanguage m_CurrentLanguage;
		public SupportedLanguage CurrentLanguage
		{
			get{return m_CurrentLanguage;}
			set{m_CurrentLanguage = value;}
		}

		protected override void OnCreate()
		{
			m_CurrentLanguage = SupportedLanguage.Italian;
			m_TemplateInstallerFile = "";
		}


		protected override void OnLoad(System.IO.IsolatedStorage.IsolatedStorageFileStream p_File, int p_CurrentVersion)
		{
			Read(p_File, out m_OutputMakeFile);
			Read(p_File, out m_BannerBitmapFile);
			Read(p_File, out m_TemplateInstallerFile);
			int l_Language;
			Read(p_File, out l_Language);
			m_CurrentLanguage = (SupportedLanguage)l_Language;
		}

		protected override void OnSave(System.IO.IsolatedStorage.IsolatedStorageFileStream p_File)
		{
			base.OnSave(p_File);

			Write(p_File, m_OutputMakeFile);
			Write(p_File, m_BannerBitmapFile);
			Write(p_File, m_TemplateInstallerFile);
			Write(p_File, (int)m_CurrentLanguage);
		}
	}
}

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


Written By
Software Developer
Italy Italy
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions