protected bool SandboxCheck(EnvironmentInfo p_eifEnvironmentInfo)
{
try
{
new XmlSerializer(typeof(WindowPositions));
}
catch (InvalidOperationException)
{
string strMessage = "{0} has detected that it is running in a sandbox." + Environment.NewLine +
"The sandbox is preventing {0} from performing" + Environment.NewLine +
"important operations. Please run {0} again," + Environment.NewLine +
"without the sandbox.";
string strDetails = "This error commonly occurs on computers running Comodo Antivirus.<br/>" +
"If you are running Comodo or any antivirus, please add {0} and its folders to the exception list.<br/><br/>";
ExtendedMessageBox.Show(null, String.Format(strMessage, p_eifEnvironmentInfo.Settings.ModManagerName), "Sandbox Detected", String.Format(strDetails, p_eifEnvironmentInfo.Settings.ModManagerName), MessageBoxButtons.OK, MessageBoxIcon.Warning);
return false;
}
catch (System.Runtime.InteropServices.ExternalException)
{
string strMessage = "{0} has detected that it is running in a sandbox." + Environment.NewLine +
"The sandbox is preventing {0} from performing" + Environment.NewLine +
"important operations. Please run {0} again," + Environment.NewLine +
"without the sandbox.";
string strDetails = "This error commonly occurs on computers running Zone Alarm.<br/>" +
"If you are running Zone Alarm or any similar security suite, please add {0} and its folders to the exception list.<br/><br/>";
ExtendedMessageBox.Show(null, String.Format(strMessage, p_eifEnvironmentInfo.Settings.ModManagerName), "Sandbox Detected", String.Format(strDetails, p_eifEnvironmentInfo.Settings.ModManagerName), MessageBoxButtons.OK, MessageBoxIcon.Warning);
return false;
}
return true;
}