diff options
Diffstat (limited to '')
| -rw-r--r-- | src/burn/engine/exeengine.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/burn/engine/exeengine.cpp b/src/burn/engine/exeengine.cpp index 701adb74..1168f5ea 100644 --- a/src/burn/engine/exeengine.cpp +++ b/src/burn/engine/exeengine.cpp | |||
| @@ -687,7 +687,6 @@ extern "C" HRESULT ExeEngineRunProcess( | |||
| 687 | { | 687 | { |
| 688 | HRESULT hr = S_OK; | 688 | HRESULT hr = S_OK; |
| 689 | LPWSTR sczCommand = NULL; | 689 | LPWSTR sczCommand = NULL; |
| 690 | STARTUPINFOW si = { }; | ||
| 691 | PROCESS_INFORMATION pi = { }; | 690 | PROCESS_INFORMATION pi = { }; |
| 692 | GENERIC_EXECUTE_MESSAGE message = { }; | 691 | GENERIC_EXECUTE_MESSAGE message = { }; |
| 693 | int nResult = IDNOACTION; | 692 | int nResult = IDNOACTION; |
| @@ -695,7 +694,6 @@ extern "C" HRESULT ExeEngineRunProcess( | |||
| 695 | BOOL fDelayedCancel = FALSE; | 694 | BOOL fDelayedCancel = FALSE; |
| 696 | BOOL fFireAndForget = BURN_PACKAGE_TYPE_EXE == pPackage->type && pPackage->Exe.fFireAndForget; | 695 | BOOL fFireAndForget = BURN_PACKAGE_TYPE_EXE == pPackage->type && pPackage->Exe.fFireAndForget; |
| 697 | BOOL fInheritHandles = BURN_PACKAGE_TYPE_BUNDLE == pPackage->type; | 696 | BOOL fInheritHandles = BURN_PACKAGE_TYPE_BUNDLE == pPackage->type; |
| 698 | size_t cchCachedDirectory = 0; | ||
| 699 | 697 | ||
| 700 | // Always add user supplied arguments last. | 698 | // Always add user supplied arguments last. |
| 701 | if (wzUserArgs) | 699 | if (wzUserArgs) |
| @@ -704,19 +702,10 @@ extern "C" HRESULT ExeEngineRunProcess( | |||
| 704 | ExitOnFailure(hr, "Failed to append user args."); | 702 | ExitOnFailure(hr, "Failed to append user args."); |
| 705 | } | 703 | } |
| 706 | 704 | ||
| 707 | // CreateProcessW has undocumented MAX_PATH restriction for lpCurrentDirectory even when long path support is enabled. | ||
| 708 | if (wzCachedDirectory && FAILED(::StringCchLengthW(wzCachedDirectory, MAX_PATH - 1, &cchCachedDirectory))) | ||
| 709 | { | ||
| 710 | wzCachedDirectory = NULL; | ||
| 711 | } | ||
| 712 | |||
| 713 | // Make the cache location of the executable the current directory to help those executables | 705 | // Make the cache location of the executable the current directory to help those executables |
| 714 | // that expect stuff to be relative to them. | 706 | // that expect stuff to be relative to them. |
| 715 | si.cb = sizeof(si); | 707 | hr = CoreCreateProcess(wzExecutablePath, sczCommand ? sczCommand : sczBaseCommand, fInheritHandles, CREATE_NO_WINDOW, wzCachedDirectory, 0, &pi); |
| 716 | if (!::CreateProcessW(wzExecutablePath, sczCommand ? sczCommand : sczBaseCommand, NULL, NULL, fInheritHandles, CREATE_NO_WINDOW, NULL, wzCachedDirectory, &si, &pi)) | 708 | ExitOnFailure(hr, "Failed to CreateProcess on path: %ls", wzExecutablePath); |
| 717 | { | ||
| 718 | ExitWithLastError(hr, "Failed to CreateProcess on path: %ls", wzExecutablePath); | ||
| 719 | } | ||
| 720 | 709 | ||
| 721 | message.type = GENERIC_EXECUTE_MESSAGE_PROCESS_STARTED; | 710 | message.type = GENERIC_EXECUTE_MESSAGE_PROCESS_STARTED; |
| 722 | message.dwUIHint = MB_OK; | 711 | message.dwUIHint = MB_OK; |
