Skip to content

Commit

Permalink
Enable disabling child process creation for NanaZip Self Extracting E…
Browse files Browse the repository at this point in the history
…xecutables.
  • Loading branch information
MouriNaruto committed Nov 30, 2024
1 parent 6b8df84 commit 79008a6
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Documents/ReleaseNotesPreview.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ For stable versions, please read [NanaZip Release Notes](ReleaseNotes.md).
- Synchronize the RHash implementation to the latest master branch which is
after v1.4.5.
(https://github.com/rhash/RHash/commit/cf2adf22ae7c39d9b8e5e7b87222046a8f42b3dc)
- Enable disabling child process creation for NanaZip Self Extracting
Executables.

**NanaZip 3.5 Preview 0 (3.5.1000.0)**

Expand Down
5 changes: 5 additions & 0 deletions NanaZip.Core/SevenZip/CPP/7zip/Bundles/SFXWin/SfxWin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,11 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
ShowErrorMessage(L"Cannot enable security mitigations");
}

if (!::NanaZipDisableChildProcesses())
{
ShowErrorMessage(L"Cannot enable security mitigations");
}

::MileEnablePerMonitorDialogScaling();
// **************** NanaZip Modification End ****************

Expand Down
9 changes: 9 additions & 0 deletions NanaZip.Core/SevenZip/CPP/7zip/UI/Console/MainAr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,15 @@ int Z7_CDECL main
<< NError::MyFormatMessage(GetLastError())
<< endl;
}

if (!::NanaZipDisableChildProcesses())
{
FlushStreams();
*g_ErrStream
<< "Cannot disable child processes: "
<< NError::MyFormatMessage(GetLastError())
<< endl;
}
// **************** NanaZip Modification End ****************

NConsoleClose::CCtrlHandlerSetter ctrlHandlerSetter;
Expand Down
3 changes: 2 additions & 1 deletion ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ Kenji Mouri
- Enable Package Integrity Check.
- Enable EH Continuation Metadata.
- Enable Signed Returns.
- Enable disabling child process creation for command line version of NanaZip.
- Enable disabling child process creation for NanaZip CLI and Self Extracting
Executables.

## Differences between NanaZip and NanaZip Classic

Expand Down

0 comments on commit 79008a6

Please sign in to comment.