المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Start a Service after install it ?



C# Programming
09-01-2009, 11:42 AM
Hi.
I've created a service and installed it with following code :
public static void InstallService(string ExeFilename)
{
System.Configuration.Install.AssemblyInstaller Installer = new System.Configuration.Install.AssemblyInstaller(ExeFilename, new string[] { });
Installer.UseNewContext = true;
Installer.Install(null);
Installer.Commit(null);
}

I wanna start it after install, could you please guide me how I can do it ?

Thanks.