@@ -727,9 +727,13 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
727
727
BalLog (BOOTSTRAPPER_LOG_LEVEL_ERROR, " Failed to load AssociateFiles state: error code 0x%08X" , hr);
728
728
}
729
729
730
- _engine->SetVariableNumeric (L" Include_launcher" , 1 );
730
+ LONGLONG includeLauncher;
731
+ if (FAILED (BalGetNumericVariable (L" Include_launcher" , &includeLauncher))
732
+ || includeLauncher == -1 ) {
733
+ _engine->SetVariableNumeric (L" Include_launcher" , 1 );
734
+ _engine->SetVariableNumeric (L" InstallLauncherAllUsers" , fPerMachine ? 1 : 0 );
735
+ }
731
736
_engine->SetVariableNumeric (L" DetectedOldLauncher" , 1 );
732
- _engine->SetVariableNumeric (L" InstallLauncherAllUsers" , fPerMachine ? 1 : 0 );
733
737
}
734
738
return CheckCanceled () ? IDCANCEL : IDNOACTION;
735
739
}
@@ -796,6 +800,12 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
796
800
}
797
801
}
798
802
803
+ LONGLONG includeLauncher;
804
+ if (SUCCEEDED (BalGetNumericVariable (L" Include_launcher" , &includeLauncher))
805
+ && includeLauncher != -1 ) {
806
+ detectedLauncher = FALSE ;
807
+ }
808
+
799
809
if (detectedLauncher) {
800
810
/* When we detect the current version of the launcher. */
801
811
_engine->SetVariableNumeric (L" Include_launcher" , 1 );
@@ -819,6 +829,14 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
819
829
_baFunction->OnDetectComplete ();
820
830
}
821
831
832
+ if (SUCCEEDED (hrStatus)) {
833
+ LONGLONG includeLauncher;
834
+ if (SUCCEEDED (BalGetNumericVariable (L" Include_launcher" , &includeLauncher))
835
+ && includeLauncher == -1 ) {
836
+ _engine->SetVariableNumeric (L" Include_launcher" , 1 );
837
+ }
838
+ }
839
+
822
840
if (SUCCEEDED (hrStatus)) {
823
841
hrStatus = EvaluateConditions ();
824
842
}
@@ -1451,6 +1469,10 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
1451
1469
hr = ParseOverridableVariablesFromXml (pixdManifest);
1452
1470
BalExitOnFailure (hr, " Failed to read overridable variables." );
1453
1471
1472
+ if (_command.action == BOOTSTRAPPER_ACTION_MODIFY) {
1473
+ LoadOptionalFeatureStates (_engine);
1474
+ }
1475
+
1454
1476
hr = ParseVariablesFromUnattendXml ();
1455
1477
ExitOnFailure (hr, " Failed to read unattend.ini file." );
1456
1478
@@ -1478,10 +1500,6 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
1478
1500
hr = UpdateUIStrings (_command.action );
1479
1501
BalExitOnFailure (hr, " Failed to load UI strings." );
1480
1502
1481
- if (_command.action == BOOTSTRAPPER_ACTION_MODIFY) {
1482
- LoadOptionalFeatureStates (_engine);
1483
- }
1484
-
1485
1503
GetBundleFileVersion ();
1486
1504
// don't fail if we couldn't get the version info; best-effort only
1487
1505
LExit:
0 commit comments