private void btnSave_Click(object sender, EventArgs e) { btnSave.Enabled = false; try { List <AppContainer> list = new List <AppContainer>(); foreach (ListViewItem checkedItem in lvAppContainers.CheckedItems) { list.Add(checkedItem.Tag as AppContainer); } AppContainer.ExemptFromLoopbackBlocking(list.ToArray()); tsslStatus.Text = "Loopback exemption configuration successfully updated."; } catch (UnauthorizedAccessException) { MessageBox.Show("You must run this tool elevated to change AppContainer configurations.", "Changes not saved"); tsslStatus.Text = "Changes not saved. Tool must be run by an Administrator."; } catch (Exception ex2) { MessageBox.Show(ex2.Message, "Failed to save settings."); tsslStatus.Text = "Changes not saved."; } }