2012-06-11 39 views

回答

0

感謝Frank白給我最初的線索:)

繼承人的完整回答我的問題。

using Microsoft.Win32; 

//this will create the subkey or if it already exists will just get the location. there is //no getsubkey in the registryclass 

RegistryKey rkRegOutlookPreferences = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Office\11.0\Outlook\Preferences"); 

//this will add in or change a value in that subkey 

rkRegOutlookPreferences.SetValue("NewmailDesktopAlerts", "0", RegistryValueKind.DWord); 

//there is also getValue; this will return a null if the value doesnt exist 

rkRegOutlookPreferences.GetValue("NewmailDesktopAlerts") 

//and deleting 

rkRegOutlookPreferences.DeleteValue("NewmailDesktopAlerts"); 

還有更多,但這完成了我的問題的完整答案。再次感謝弗蘭克懷特給我的第一步。

1
HKEY_CURRENT_USER\Software\Microsoft\Office\<version number here>\Outlook\Preferences\NewmailDesktopAlerts 

將其改爲零。