I suspect the problem is the process.WaitForExit();
line or passing a relative file path instead of an absolute file path.
WebCore.Shutdown();
DeleteCache();
Application.Exit();
// ...
private void DeleteCache()
{
ProcessStartInfo info = new ProcessStartInfo();
// get the full path to the Awesomium cache directory
string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Cache");
string command = String.Format("RMDIR /S /Q \""{0}\"", path);
// get the path to cmd.exe
info.FileName = System.Environment.GetEnvironmentVariable("COMSPEC") ?? "cmd.exe";
// append the cmd.exe flags to disable auto-run scripts (/D) and to exit at completion (/C)
info.Arguments = String.Concat("/D /C ", command);
info.WindowStyle = ProcessWindowStyle.Hidden;
// start the process without waiting for completion
Process.Start(info);
}
I also don't understand why Awesomium runs their own clone of SO with Awesomium Answers. Awesomium could just simply monitor questions tagged as awesomium. The Anwsers forum is even more frustrating given the irregular involvement of the Awesomium LLC developers.