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 +}