diff --git a/OpenRA.Game/FileSystem/InstallShieldCABExtractor.cs b/OpenRA.Game/FileSystem/InstallShieldCABExtractor.cs index 8f7ecc044a..3fc74d0d04 100644 --- a/OpenRA.Game/FileSystem/InstallShieldCABExtractor.cs +++ b/OpenRA.Game/FileSystem/InstallShieldCABExtractor.cs @@ -443,6 +443,7 @@ namespace OpenRA.FileSystem public void ExtractFile(uint index, string fileName) { + Directory.CreateDirectory(Path.GetDirectoryName(fileName)); using (var destfile = File.Open(fileName, FileMode.Create)) GetContentById(index, destfile); } diff --git a/OpenRA.Mods.Common/Widgets/Logic/Installation/InstallFromCDLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Installation/InstallFromCDLogic.cs index 1fcee2378b..960e4ce140 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Installation/InstallFromCDLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Installation/InstallFromCDLogic.cs @@ -137,7 +137,11 @@ namespace OpenRA.Mods.Common.Widgets.Logic } } - afterInstall(); + Game.RunAfterTick(() => + { + Ui.CloseWindow(); + afterInstall(); + }); }) { IsBackground = true }.Start(); }