From c3169ee748da73dfd00bfff4e3aaf8aa4a2da653 Mon Sep 17 00:00:00 2001 From: dmex Date: Wed, 29 May 2019 17:26:08 +0200 Subject: [PATCH] Fix #421 --- tools/CustomSetupTool/CustomSetupTool/install.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tools/CustomSetupTool/CustomSetupTool/install.c b/tools/CustomSetupTool/CustomSetupTool/install.c index e25c9db1c..53d183529 100644 --- a/tools/CustomSetupTool/CustomSetupTool/install.c +++ b/tools/CustomSetupTool/CustomSetupTool/install.c @@ -38,18 +38,16 @@ NTSTATUS SetupProgressThread( if (!SetupUninstallKph(Context)) goto CleanupExit; - // Create the install folder path. - if (!NT_SUCCESS(PhCreateDirectory(SetupInstallPath))) - goto CleanupExit; - // Upgrade the 2.x settings file. SetupUpgradeSettingsFile(); // Remove the previous installation. if (Context->SetupResetSettings) - { PhDeleteDirectory(SetupInstallPath); - } + + // Create the install folder path. + if (!NT_SUCCESS(PhCreateDirectory(SetupInstallPath))) + goto CleanupExit; // Create the uninstaller. if (!SetupCreateUninstallFile(Context)) @@ -216,4 +214,4 @@ INT_PTR CALLBACK SetupInstallPropPage_WndProc( } return FALSE; -} \ No newline at end of file +}