private bool ExecuteUpdaterScript()
{
string UpdaterScriptPath = SystemInfo.GetNWNX4InstallationDirectory() + "ACR_UpdaterScript.cmd";
if (!File.Exists(UpdaterScriptPath))
{
WriteTimestampedLogEntry(String.Format(
"ACR_ServerMisc.ExecuteUpdaterScript(): Updater script '{0}' doesn't exist.",
UpdaterScriptPath));
return false;
}
try
{
ProcessStartInfo StartInfo = new ProcessStartInfo(UpdaterScriptPath);
StartInfo.CreateNoWindow = true;
StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
StartInfo.LoadUserProfile = false;
StartInfo.UseShellExecute = false;
Process.Start(StartInfo);
}
catch (Exception e)
{
WriteTimestampedLogEntry(String.Format(
"ACR_ServerMisc.ExecuteUpdaterScript(): Exception '{0}' starting updater script '{1}'.",
e,
UpdaterScriptPath));
return false;
}
return true;
}