Update MainForm.cs

Error handling in case of protected registry via anti-virus softwares etc...