怎么我在安装程序项目下添加了安装程序类,但运行安装程序时却不用调用安装程序类呢?
怎么我在安装程序项目下添加了安装程序类,但运行安装程序时却不用调用安装程序类呢?
namespace ClassLibrary
{
[RunInstaller(true)]
public partial class Installer1 : Installer
{
public Installer1()
{
InitializeComponent();
this.AfterInstall += new InstallEventHandler(Install_Affter);
}
protected override void OnAfterInstall(System.Collections.IDictionary savedState)
{
using (FileStream fs = new FileStream(@"C:\install.log", FileMode.Create))
fs.Close();
base.OnAfterInstall(savedState);
}
public void Install_Affter(object sender, InstallEventArgs e)
{
using(FileStream fs = new FileStream(@"C:\install.log", FileMode.Create))
fs.Close();
}
}
}