diff options
Diffstat (limited to 'src/burn/engine/elevation.cpp')
-rw-r--r-- | src/burn/engine/elevation.cpp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/burn/engine/elevation.cpp b/src/burn/engine/elevation.cpp index ea56e242..8488b649 100644 --- a/src/burn/engine/elevation.cpp +++ b/src/burn/engine/elevation.cpp | |||
@@ -940,6 +940,15 @@ extern "C" HRESULT ElevationExecuteExePackage( | |||
940 | hr = BuffWriteNumber(&pbData, &cbData, fRollback); | 940 | hr = BuffWriteNumber(&pbData, &cbData, fRollback); |
941 | ExitOnFailure(hr, "Failed to write rollback."); | 941 | ExitOnFailure(hr, "Failed to write rollback."); |
942 | 942 | ||
943 | hr = BuffWriteString(&pbData, &cbData, pExecuteAction->exePackage.sczIgnoreDependencies); | ||
944 | ExitOnFailure(hr, "Failed to write the list of dependencies to ignore to the message buffer."); | ||
945 | |||
946 | hr = BuffWriteString(&pbData, &cbData, pExecuteAction->exePackage.sczAncestors); | ||
947 | ExitOnFailure(hr, "Failed to write the list of ancestors to the message buffer."); | ||
948 | |||
949 | hr = BuffWriteString(&pbData, &cbData, pExecuteAction->exePackage.sczEngineWorkingDirectory); | ||
950 | ExitOnFailure(hr, "Failed to write the custom working directory to the message buffer."); | ||
951 | |||
943 | hr = VariableSerialize(pVariables, FALSE, &pbData, &cbData); | 952 | hr = VariableSerialize(pVariables, FALSE, &pbData, &cbData); |
944 | ExitOnFailure(hr, "Failed to write variables."); | 953 | ExitOnFailure(hr, "Failed to write variables."); |
945 | 954 | ||
@@ -2844,6 +2853,9 @@ static HRESULT OnExecuteExePackage( | |||
2844 | LPWSTR sczPackage = NULL; | 2853 | LPWSTR sczPackage = NULL; |
2845 | DWORD dwRollback = 0; | 2854 | DWORD dwRollback = 0; |
2846 | BURN_EXECUTE_ACTION executeAction = { }; | 2855 | BURN_EXECUTE_ACTION executeAction = { }; |
2856 | LPWSTR sczIgnoreDependencies = NULL; | ||
2857 | LPWSTR sczAncestors = NULL; | ||
2858 | LPWSTR sczEngineWorkingDirectory = NULL; | ||
2847 | BOOTSTRAPPER_APPLY_RESTART exeRestart = BOOTSTRAPPER_APPLY_RESTART_NONE; | 2859 | BOOTSTRAPPER_APPLY_RESTART exeRestart = BOOTSTRAPPER_APPLY_RESTART_NONE; |
2848 | 2860 | ||
2849 | executeAction.type = BURN_EXECUTE_ACTION_TYPE_EXE_PACKAGE; | 2861 | executeAction.type = BURN_EXECUTE_ACTION_TYPE_EXE_PACKAGE; |
@@ -2858,6 +2870,15 @@ static HRESULT OnExecuteExePackage( | |||
2858 | hr = BuffReadNumber(pbData, cbData, &iData, &dwRollback); | 2870 | hr = BuffReadNumber(pbData, cbData, &iData, &dwRollback); |
2859 | ExitOnFailure(hr, "Failed to read rollback."); | 2871 | ExitOnFailure(hr, "Failed to read rollback."); |
2860 | 2872 | ||
2873 | hr = BuffReadString(pbData, cbData, &iData, &sczIgnoreDependencies); | ||
2874 | ExitOnFailure(hr, "Failed to read the list of dependencies to ignore."); | ||
2875 | |||
2876 | hr = BuffReadString(pbData, cbData, &iData, &sczAncestors); | ||
2877 | ExitOnFailure(hr, "Failed to read the list of ancestors."); | ||
2878 | |||
2879 | hr = BuffReadString(pbData, cbData, &iData, &sczEngineWorkingDirectory); | ||
2880 | ExitOnFailure(hr, "Failed to read the custom working directory."); | ||
2881 | |||
2861 | hr = VariableDeserialize(pVariables, FALSE, pbData, cbData, &iData); | 2882 | hr = VariableDeserialize(pVariables, FALSE, pbData, cbData, &iData); |
2862 | ExitOnFailure(hr, "Failed to read variables."); | 2883 | ExitOnFailure(hr, "Failed to read variables."); |
2863 | 2884 | ||
@@ -2869,11 +2890,34 @@ static HRESULT OnExecuteExePackage( | |||
2869 | ExitWithRootFailure(hr, E_INVALIDARG, "Package is not an EXE package: %ls", sczPackage); | 2890 | ExitWithRootFailure(hr, E_INVALIDARG, "Package is not an EXE package: %ls", sczPackage); |
2870 | } | 2891 | } |
2871 | 2892 | ||
2893 | // Pass the list of dependencies to ignore, if any, to the related bundle. | ||
2894 | if (sczIgnoreDependencies && *sczIgnoreDependencies) | ||
2895 | { | ||
2896 | hr = StrAllocString(&executeAction.exePackage.sczIgnoreDependencies, sczIgnoreDependencies, 0); | ||
2897 | ExitOnFailure(hr, "Failed to allocate the list of dependencies to ignore."); | ||
2898 | } | ||
2899 | |||
2900 | // Pass the list of ancestors, if any, to the related bundle. | ||
2901 | if (sczAncestors && *sczAncestors) | ||
2902 | { | ||
2903 | hr = StrAllocString(&executeAction.exePackage.sczAncestors, sczAncestors, 0); | ||
2904 | ExitOnFailure(hr, "Failed to allocate the list of ancestors."); | ||
2905 | } | ||
2906 | |||
2907 | if (sczEngineWorkingDirectory && *sczEngineWorkingDirectory) | ||
2908 | { | ||
2909 | hr = StrAllocString(&executeAction.exePackage.sczEngineWorkingDirectory, sczEngineWorkingDirectory, 0); | ||
2910 | ExitOnFailure(hr, "Failed to allocate the custom working directory."); | ||
2911 | } | ||
2912 | |||
2872 | // Execute EXE package. | 2913 | // Execute EXE package. |
2873 | hr = ExeEngineExecutePackage(&executeAction, pCache, pVariables, static_cast<BOOL>(dwRollback), GenericExecuteMessageHandler, hPipe, &exeRestart); | 2914 | hr = ExeEngineExecutePackage(&executeAction, pCache, pVariables, static_cast<BOOL>(dwRollback), GenericExecuteMessageHandler, hPipe, &exeRestart); |
2874 | ExitOnFailure(hr, "Failed to execute EXE package."); | 2915 | ExitOnFailure(hr, "Failed to execute EXE package."); |
2875 | 2916 | ||
2876 | LExit: | 2917 | LExit: |
2918 | ReleaseStr(sczEngineWorkingDirectory); | ||
2919 | ReleaseStr(sczAncestors); | ||
2920 | ReleaseStr(sczIgnoreDependencies); | ||
2877 | ReleaseStr(sczPackage); | 2921 | ReleaseStr(sczPackage); |
2878 | PlanUninitializeExecuteAction(&executeAction); | 2922 | PlanUninitializeExecuteAction(&executeAction); |
2879 | 2923 | ||