protected override void OnStart(string[] args) { try { SoGhiGiamSatThuMuc.WriteEntry("Running"); Thread _t = new Thread(new ThreadStart(DoWork)); _t.IsBackground = true; _t.Start(); } catch (Exception ex) { SoGhiGiamSatThuMuc.WriteEntry(ex.Message); SoGhiGiamSatThuMuc.Close(); } Console.ReadLine(); }