Hi
Ling Wang,
Thanks for the reply! After a long time, I could see some response here.
I gone through that link. I have also gone through some of the aricles available in web. But I coul'nt do any custom actions while installing.
Please see the code snippet of the installer class.
using
System;
using
System.Collections.Generic;
using
System.Text;
using
System.ComponentModel;
using
System.Configuration.Install;
using
System.Collections;
using
System.IO;
using
System.Diagnostics;
namespace
SynapseInstallerClassLibrary
{
[
RunInstaller(true)]
public partial class Installer1 : Installer
{
public Installer1()
{
InitializeComponent();
this.Committed += new InstallEventHandler(Installer1_Committed);
}
public override void Install(IDictionary stateSaver)
{
base.Install(stateSaver);
}
public override void Rollback(IDictionary savedState)
{
base.Rollback(savedState);
}
public override void Commit(IDictionary savedState)
{
base.Commit(savedState);
}
public override void Uninstall(IDictionary savedState)
{
base.Uninstall(savedState);
}
private void Installer1_Committed(object sender,
InstallEventArgs e)
{
string strPath = "C:\\Program Files\\Sanjeevi";
try
{
if (Directory.Exists(strPath))
{
Directory.Delete(strPath);
}
}
catch (Exception)
{
throw;
}
}
}
}