|
using System;
using System.Collections;
using System.ComponentModel;
using System.Configuration.Install;
namespace SampleNonIISWebApp
{
/// <summary>
/// Summary description for Installer1.
/// </summary>
[RunInstaller(true)]
public class Installer1 : System.Configuration.Install.Installer
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public Installer1()
{
// This call is required by the Designer.
InitializeComponent();
// TODO: Add any initialization after the InitializeComponent call
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
private static readonly Guid applicationID =
new Guid("{3BE022C5-C34C-41ea-913E-F390E904B47D}"); // <= Replace the GUID with your own
public override void Install(IDictionary savedState)
{
string appLocation = Context.Parameters["applocation"];
CassiniConfiguration.Metabase.RegisterApplication(applicationID,
"Is IIS Neccessary?", // <= Replace with your real application name
"Life after IIS is fun!", // <= Replace with your real app description
appLocation, "WebForm1.aspx"); // <= May need to replace default document name
base.Install(savedState);
}
public override void Rollback(IDictionary savedState)
{
CassiniConfiguration.Metabase.UnregisterApplication(applicationID);
base.Rollback (savedState);
}
public override void Uninstall(IDictionary savedState)
{
CassiniConfiguration.Metabase.UnregisterApplication(applicationID);
base.Uninstall (savedState);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
}
}
|
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.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.