|
|
@ -60,7 +60,7 @@ static bool ReadDataString(CFSTR fileName, LPCSTR startID, |
|
|
|
Byte buffer[kBufferSize]; |
|
|
|
const unsigned signatureStartSize = MyStringLen(startID); |
|
|
|
const unsigned signatureEndSize = MyStringLen(endID); |
|
|
|
|
|
|
|
|
|
|
|
size_t numBytesPrev = 0; |
|
|
|
bool writeMode = false; |
|
|
|
UInt64 posTotal = 0; |
|
|
@ -157,8 +157,6 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, |
|
|
|
{ |
|
|
|
ShowErrorMessage(L"Cannot enable security mitigations"); |
|
|
|
} |
|
|
|
|
|
|
|
::MileEnablePerMonitorDialogScaling(); |
|
|
|
// **************** NanaZip Modification End ****************
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
@ -220,7 +218,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, |
|
|
|
return 0; |
|
|
|
} |
|
|
|
appLaunched = GetTextConfigValue(pairs, "RunProgram"); |
|
|
|
|
|
|
|
|
|
|
|
#ifdef MY_SHELL_EXECUTE
|
|
|
|
executeFile = GetTextConfigValue(pairs, "ExecuteFile"); |
|
|
|
executeParameters = GetTextConfigValue(pairs, "ExecuteParameters"); |
|
|
@ -253,7 +251,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, |
|
|
|
UString errorMessage; |
|
|
|
HRESULT result = ExtractArchive(codecs, fullPath, tempDirPath, showProgress, |
|
|
|
isCorrupt, errorMessage); |
|
|
|
|
|
|
|
|
|
|
|
if (result != S_OK) |
|
|
|
{ |
|
|
|
if (!assumeYes) |
|
|
@ -279,7 +277,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, |
|
|
|
if (!SetCurrentDir(tempDirPath)) |
|
|
|
return 1; |
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
HANDLE hProcess = NULL; |
|
|
|
#ifdef MY_SHELL_EXECUTE
|
|
|
|
if (!executeFile.IsEmpty()) |
|
|
@ -334,13 +332,13 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, |
|
|
|
return 1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
FString s2 = tempDirPath; |
|
|
|
NName::NormalizeDirPathPrefix(s2); |
|
|
|
appLaunched.Replace(L"%%T" WSTRING_PATH_SEPARATOR, fs2us(s2)); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const UString appNameForError = appLaunched; // actually we need to rtemove parameters also
|
|
|
|
|
|
|
|
appLaunched.Replace(L"%%T", fs2us(tempDirPath)); |
|
|
@ -358,11 +356,11 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, |
|
|
|
startupInfo.dwFlags = 0; |
|
|
|
startupInfo.cbReserved2 = 0; |
|
|
|
startupInfo.lpReserved2 = NULL; |
|
|
|
|
|
|
|
|
|
|
|
PROCESS_INFORMATION processInformation; |
|
|
|
|
|
|
|
|
|
|
|
const CSysString appLaunchedSys (GetSystemString(dirPrefix + appLaunched)); |
|
|
|
|
|
|
|
|
|
|
|
const BOOL createResult = CreateProcess(NULL, |
|
|
|
appLaunchedSys.Ptr_non_const(), |
|
|
|
NULL, NULL, FALSE, 0, NULL, NULL /*tempDir.GetPath() */, |
|
|
|