Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions Ext2Srv/Ext2Pipe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ Ext2CreatePipe()

sa = Ext2CreateSA();

ap->p = CreateNamedPipe( _T(EXT2_MGR_SRV), PIPE_ACCESS_DUPLEX |
FILE_FLAG_WRITE_THROUGH /* | ACCESS_SYSTEM_SECURITY */,
ap->p = CreateNamedPipe( _T(EXT2_MGR_SRV), PIPE_ACCESS_DUPLEX,
/* no WRITE_THROUGH: tiny IPC messages; measure if needed */
PIPE_TYPE_BYTE | PIPE_READMODE_BYTE |
PIPE_WAIT /* PIPE_REJECT_REMOTE_CLIENTS */ ,
PIPE_UNLIMITED_INSTANCES,
Expand Down Expand Up @@ -429,21 +429,23 @@ Ext2PipeEngine(VOID *arg)
/* create named pipe */
ap = Ext2CreatePipe();
if (NULL == ap) {
if (times++ < 10) {
Sleep(250 * times);
if (times++ < 3) {
Sleep(50);
goto retry;
}
Sleep(100);
continue;
}

/* ASSD_PIPE is valid or not */
if (!ap->p || ap->p == INVALID_HANDLE_VALUE ||
!ap->e || ap->e == INVALID_HANDLE_VALUE) {
Ext2DestroyPipe(ap);
if (times++ < 10) {
Sleep(500);
if (times++ < 3) {
Sleep(50);
goto retry;
}
Sleep(100);
continue;
}

Expand Down Expand Up @@ -498,6 +500,9 @@ DWORD Ext2StartPipeSrv()
rc = WaitForSingleObject(g_wait, 1000*1);
} while (rc == WAIT_TIMEOUT);

/* Second idle listener so a reconnect/overlap rarely hits PIPE_BUSY. */
_beginthread(Ext2PipeEngine, 0, NULL);

return 0;
}

Expand Down
5 changes: 3 additions & 2 deletions Ext2Srv/Ext2Srv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,14 @@ Ext2SetupService(BOOL bInstall)
if (bInstall) {

// now create service entry for Ext2Mgr
// Note: SERVICE_INTERACTIVE_PROCESS removed - interactive services are deprecated
// and don't work on modern Windows (can't create named pipes accessible to user sessions)
hService = CreateService(
hManager, // SCManager database
_T("Ext2Srv"), // name of service
_T("Ext2Fsd Service Manager"), // name to display
SERVICE_ALL_ACCESS, // desired access
SERVICE_WIN32_OWN_PROCESS | // service type
SERVICE_INTERACTIVE_PROCESS,
SERVICE_WIN32_OWN_PROCESS, // service type (removed SERVICE_INTERACTIVE_PROCESS)
SERVICE_AUTO_START, // start type
SERVICE_ERROR_NORMAL, // error control type
Target, // service's binary
Expand Down
8 changes: 4 additions & 4 deletions Ext2Srv/Ext2Srv.rc
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,4,71,1
PRODUCTVERSION 1,4,71,1
FILEVERSION 1,4,71,2
PRODUCTVERSION 1,4,71,2
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -85,12 +85,12 @@ BEGIN
VALUE "Comments", "Bo Branten <bosse@accum.se>"
VALUE "CompanyName", "Ext2Fsd Group (www.ext2fsd.com)"
VALUE "FileDescription", "Ext2Fsd Service"
VALUE "FileVersion", "1.4.71.1"
VALUE "FileVersion", "1.4.71.2"
VALUE "InternalName", "Ext2Srv"
VALUE "LegalCopyright", "Copyright (C) 2002-2017 Matt Wu <matt@ext2fsd.com>"
VALUE "OriginalFilename", "Ext2Srv.exe"
VALUE "ProductName", "Ext2Fsd Service"
VALUE "ProductVersion", "1.4.71.1"
VALUE "ProductVersion", "1.4.71.2"
END
END
BLOCK "VarFileInfo"
Expand Down
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
Ext2Mgr Iced port (this branch)
-------------------------------

This branch (`ext2mgr-iced`) adds an optional **Rust + [Iced](https://iced.rs/) GUI** for managing Ext2/Ext4 volumes on Windows, under **`ext2mgr_iced/`**. It is modeled on classic MFC **Ext2 Volume Manager** (`Ext2Mgr/`) and talks to the same Ext2Fsd driver / Ext2Srv pipe.

- Build / run: see [`ext2mgr_iced/README.md`](ext2mgr_iced/README.md) (`cargo build --release`, `cargo run`, `cargo run --release`)
- What differs from classic Ext2Mgr: [`ext2mgr_iced/PORT_IMPROVEMENTS.md`](ext2mgr_iced/PORT_IMPROVEMENTS.md)
- Source layout: [`ext2mgr_iced/docs/SOURCE_LAYOUT.md`](ext2mgr_iced/docs/SOURCE_LAYOUT.md)

Classic Ext2Mgr and Ext2Srv remain available. Driver build/install scripts below are unchanged.


Scripts and building from source (this fork)
--------------------------------------------

This fork adds PowerShell scripts for building, installing, signing, and diagnosing the driver. All scripts live in **Scripts/**. Run them from the repo root, e.g. `.\Scripts\build.ps1`.

**Build and install**
- **Scripts\build.ps1** — Build driver, Ext2Srv, and/or Ext2Mgr (Visual Studio 2019/2022). Default `-Target All` needs WDK. Use `-Target Ext2Mgr` or `-Target Ext2Srv` for user-mode only (no WDK). Optionally signs the driver if `EXT4FSD_CERT_PATH` is set. Cursor/VS Code: `.vscode/tasks.json` + `launch.json`.
- **Scripts\release_usermode.ps1** — Package Ext2Srv + `ext2mgr_iced` user-mode zips (no driver / no WDK). Default: **host architecture only**. Pass `-Platforms x64,ARM64` for both (requires ARM64 MSVC tools). Writes `dist\usermode-<version>\` with `RELEASE_NOTES.txt` and SHA256 sums.
- **Scripts\install_driver.ps1** — Copy driver to System32, register kernel driver, install Ext2Srv. Run as Administrator.
- **Scripts\uninstall_driver.ps1** — Remove driver and services.
- **Scripts\register_driver.ps1** — Register the kernel driver service (driver must already be in System32).
- **Scripts\disable_driver.ps1** — Disable the Ext2Fsd service (e.g. to stop boot retries after signature failures).

**Signing**
- **Scripts\sign_driver.ps1** — Sign the driver with a code-signing certificate. Set `EXT4FSD_CERT_PATH` and optionally `MSIX_CERT_PASSWORD`, or pass `-CertificatePath` / `-CertificatePassword`.
- **Scripts\install_certificate.ps1** — Install the signing certificate into Trusted Publishers (required for loading self-signed drivers). Run as Administrator.

**Diagnostics**
- **Scripts\diagnose_ext2fsd.ps1** — Unified diagnostic (signature, cert stores, event log, driver status). Use for load failures or error 577. Use `-UseSigntool:$false` to skip signtool (e.g. when SDK is not installed).
- **Scripts\check_driver_load_error.ps1**, **Scripts\diagnose_error_577.ps1**, **Scripts\verify_driver_signature.ps1** — Wrappers that call `diagnose_ext2fsd.ps1`.

**Other**
- **Scripts\fix_sdk_version.ps1** — Update project files' `WindowsTargetPlatformVersion` to match the installed SDK.


Latest release
--------------
Expand Down
Loading