Is it possible to prevent SourceTree from crashing when it can't access the Windows Registry?
Asked by Charles Wilson:

SourceTree 1.9.6.1 is currently crashing on my machine after startup. I'm running Windows 8 with McAfee installed (by corporate IT). I googled the error, and found this issue reported: <https://jira.atlassian.com/browse/SRCTREEWIN-5481>.. However, there's no workaround or fix info attached to the issue. Has anyone experienced and/or resolved this issue? Why does SourceTree need to change registry values? Can that be prevented?

```
Application: SourceTree.exeFramework Version: v4.0.30319Description: The process was terminated due to an unhandled exception.Exception Info: System.UnauthorizedAccessException   at Microsoft.Win32.RegistryKey.Win32Error(Int32, System.String)   at Microsoft.Win32.RegistryKey.SetValue(System.String, System.Object, Microsoft.Win32.RegistryValueKind)   at SourceTree.AppRoot.RegisterBrowserEmulationModeKey(System.String, System.String, UInt32)   at SourceTree.AppRoot.OnStartup(System.Windows.StartupEventArgs)   at SourceTree.App.OnStartup(System.Windows.StartupEventArgs)   at System.Windows.Application.&lt;.ctor&gt;b__1_0(System.Object)   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)   at System.Windows.Threading.DispatcherOperation.InvokeImpl()   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)   at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)   at System.Windows.Threading.DispatcherOperation.Invoke()   at System.Windows.Threading.Dispatcher.ProcessQueue()   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)   at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)   at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)   at System.Windows.Application.RunDispatcher(System.Object)   at System.Windows.Application.RunInternal(System.Windows.Window)   at SourceTree.App.Main()
```


Answers:
author: Seth
body: I think that Atlassian staff would have to answer your question about what it's trying to write to the registry. Maybe @Jesse Yowell or @Gideon Koh? I can't seem to tag Kieran Senior or Michael Minns.