private void CloseingPreventionStatusLabel_Click(object sender, EventArgs e) { if (CloseingPreventionChecking() == false) { try { string servicePath = (System.Reflection.Assembly.GetExecutingAssembly().CodeBase).Replace("file:///", "").Replace("MMB-Filter.exe", "MMB-Service.exe"); MessageBox.Show(servicePath.Replace("MMB-Filter.exe", "MMB - Service.exe") + " ," + File.Exists(servicePath)); ServiceAdapter.InstallService(servicePath); ServiceAdapter.StartService("GUIAdapter", 10000); } catch { MessageBox.Show("לא ניתן להתקין תוסף שירות"); } } }