Widen main window, add all Outlook security registry keys, add hint

- Main window wider (830px) so all buttons fit without resizing
- Set ALL Outlook Object Model Guard registry values (not just 3)
- Clean removal: delete entire Security subkey when disabling
- Add hint in settings that Outlook restart is needed

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
duffyduck 2026-04-03 19:29:54 +02:00
parent 3092150d3a
commit d89e36b962
3 changed files with 23 additions and 14 deletions

View File

@ -52,6 +52,13 @@ namespace StarfaceOutlookSync.Models
key.SetValue("ObjectModelGuard", 2, RegistryValueKind.DWord);
key.SetValue("PromptOOMAddressBookAccess", 2, RegistryValueKind.DWord);
key.SetValue("PromptOOMAddressInformationAccess", 2, RegistryValueKind.DWord);
key.SetValue("PromptOOMSend", 2, RegistryValueKind.DWord);
key.SetValue("PromptOOMSaveAs", 2, RegistryValueKind.DWord);
key.SetValue("PromptOOMFormulaAccess", 2, RegistryValueKind.DWord);
key.SetValue("PromptOOMCustomAction", 2, RegistryValueKind.DWord);
key.SetValue("PromptSimpleMAPISend", 2, RegistryValueKind.DWord);
key.SetValue("PromptSimpleMAPINameResolve", 2, RegistryValueKind.DWord);
key.SetValue("PromptSimpleMAPIOpenMessage", 2, RegistryValueKind.DWord);
key.SetValue("AdminSecurityMode", 3, RegistryValueKind.DWord);
key.Close();
}
@ -60,15 +67,8 @@ namespace StarfaceOutlookSync.Models
// Zurueck auf Standard (Werte loeschen)
try
{
var key = Registry.CurrentUser.OpenSubKey(regPath, true);
if (key != null)
{
try { key.DeleteValue("ObjectModelGuard"); } catch { }
try { key.DeleteValue("PromptOOMAddressBookAccess"); } catch { }
try { key.DeleteValue("PromptOOMAddressInformationAccess"); } catch { }
try { key.DeleteValue("AdminSecurityMode"); } catch { }
key.Close();
}
// Kompletten Security-Schluessel entfernen
Registry.CurrentUser.DeleteSubKey(regPath, false);
}
catch { }
}

View File

@ -76,8 +76,8 @@ namespace StarfaceOutlookSync.UI
private void InitializeComponent()
{
Text = "Starface Kontakt-Sync";
Size = new Size(620, 450);
MinimumSize = new Size(500, 350);
Size = new Size(830, 450);
MinimumSize = new Size(830, 350);
StartPosition = FormStartPosition.CenterScreen;
Font = new Font("Segoe UI", 9);
Icon = AppIcon.GetIcon();

View File

@ -47,20 +47,29 @@ namespace StarfaceOutlookSync.UI
Checked = _settings.AutoAcceptOutlookPrompt
};
var lblHint = new Label
{
Text = "Hinweis: Outlook muss nach Aenderung dieser Option\nneu gestartet werden.",
Left = 38, Top = 102, Width = 300, Height = 32,
ForeColor = Color.Gray,
Font = new Font("Segoe UI", 8)
};
_btnSave = new Button
{
Text = "Speichern", Left = 95, Top = 160, Width = 85, Height = 28,
Text = "Speichern", Left = 95, Top = 170, Width = 85, Height = 28,
DialogResult = DialogResult.None
};
_btnSave.Click += (s, e) => Save();
_btnCancel = new Button
{
Text = "Abbrechen", Left = 189, Top = 160, Width = 85, Height = 28,
Text = "Abbrechen", Left = 189, Top = 170, Width = 85, Height = 28,
DialogResult = DialogResult.Cancel
};
Controls.AddRange(new Control[] { _chkStartMinimized, _chkSyncOnStart, _chkAutoAcceptOutlook, _btnSave, _btnCancel });
Size = new Size(380, 260);
Controls.AddRange(new Control[] { _chkStartMinimized, _chkSyncOnStart, _chkAutoAcceptOutlook, lblHint, _btnSave, _btnCancel });
AcceptButton = _btnSave;
CancelButton = _btnCancel;
}