{"id":31762297,"url":"https://github.com/player-alex/dokan-mirror-manager","last_synced_at":"2026-05-03T10:36:19.870Z","repository":{"id":318285641,"uuid":"1070636056","full_name":"player-alex/dokan-mirror-manager","owner":"player-alex","description":"A modern WPF application for managing Dokan file system mirrors with system tray support, single-instance mode, and intuitive UI","archived":false,"fork":false,"pushed_at":"2025-10-07T04:29:50.000Z","size":95,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-07T06:23:23.998Z","etag":null,"topics":["caliburn-micro","csharp","dokan","dotnet","filesystem","mahapps-metro","mount-manager","system-tray","windows","wpf"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/player-alex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-06T08:25:02.000Z","updated_at":"2025-10-07T04:27:55.000Z","dependencies_parsed_at":"2025-10-07T06:23:25.110Z","dependency_job_id":null,"html_url":"https://github.com/player-alex/dokan-mirror-manager","commit_stats":null,"previous_names":["player-alex/dokan-mirror","player-alex/dokan-mirror-manager"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/player-alex/dokan-mirror-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/player-alex%2Fdokan-mirror-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/player-alex%2Fdokan-mirror-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/player-alex%2Fdokan-mirror-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/player-alex%2Fdokan-mirror-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/player-alex","download_url":"https://codeload.github.com/player-alex/dokan-mirror-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/player-alex%2Fdokan-mirror-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002122,"owners_count":26083307,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["caliburn-micro","csharp","dokan","dotnet","filesystem","mahapps-metro","mount-manager","system-tray","windows","wpf"],"created_at":"2025-10-09T22:17:54.844Z","updated_at":"2026-05-03T10:36:19.855Z","avatar_url":"https://github.com/player-alex.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# ☁️ Dokan Mirror Manager\n\n![Platform](https://img.shields.io/badge/platform-Windows-0078D6?logo=windows\u0026logoColor=white)\n![.NET](https://img.shields.io/badge/.NET-8.0-512BD4?logo=.net\u0026logoColor=white)\n![C#](https://img.shields.io/badge/C%23-12.0-239120?logo=csharp\u0026logoColor=white)\n![WPF](https://img.shields.io/badge/WPF-UI-0078D6?logo=windows\u0026logoColor=white)\n![License](https://img.shields.io/badge/license-MIT-blue.svg)\n\n**A modern WPF application for managing Dokan file system mirrors with an intuitive user interface** 🚀\n\n[Features](#-features) • [Installation](#-installation) • [Usage](#-usage) • [Building](#-building-from-source)\n\n\u003c/div\u003e\n\n---\n\n## ✨ Features\n\n- 🗂️ **Multiple Mount Management** - Create and manage multiple mirror mounts simultaneously\n- 💾 **Smart Drive Letter Selection** - Automatically assigns available drive letters, prevents conflicts\n- 🤖 **Auto-Mount on Startup** - Configure mounts to automatically mount when the application starts\n- 🔒 **Read-Only Mode** - Mount mirrors in read-only mode for data protection (enabled by default)\n- 🌍 **Environment Variable Support** - Use environment variables in paths (e.g., `%USERPROFILE%\\Desktop`)\n- 🎯 **System Tray Support** - Minimize to system tray with notification support\n- ⚡ **Single Instance** - Only one application instance runs at a time; launching again restores the window\n- 🔄 **Auto-Unmount** - Automatically unmount drives on application exit with confirmation\n- 💾 **Persistent Configuration** - Save and restore mount configurations between sessions\n- 🏷️ **Dynamic Volume Labels** - Automatically sets volume labels based on source (drive label or folder name)\n- 🎨 **Modern UI** - Built with MahApps.Metro for a clean, modern interface\n- 🚀 **Non-Blocking Operations** - Async mount/unmount operations keep UI responsive\n- ⏱️ **Smart Unmount** - Progress tracking with timeout handling and background completion\n- 🔌 **IPC API** - Query mount points from external applications via WM_COPYDATA and Named Pipes\n\n## 📸 Screenshots\n\n![Main Window](screenshot.png)\n\n## 📋 Requirements\n\n- 🪟 **Windows 10/11** (x64)\n- 🔷 **.NET 8.0 Runtime** - [Download](https://dotnet.microsoft.com/download/dotnet/8.0)\n- 📦 **[Dokan Driver](https://github.com/dokan-dev/dokany/releases)** - User mode file system library for Windows\n- 🔑 **Administrator privileges** - Required for mount operations\n\n## 📥 Installation\n\n1. **Download** the latest release from the [Releases](../../releases) page\n2. **Install** [Dokan Driver](https://github.com/dokan-dev/dokany/releases) if not already installed\n3. **Extract** the downloaded archive\n4. **Run** `dokan-mirror-manager.exe` as Administrator\n\n\u003e ⚠️ **Important**: The application must be run with Administrator privileges to perform mount operations.\n\n## 📖 Usage\n\n### ➕ Adding a Mount\n\n1. Click the **Add** button\n2. Select a source directory or drive using the folder browser\n3. A drive letter is **automatically assigned** from available letters\n4. Optionally enable **Auto Mount** to automatically mount on application startup\n5. **Read Only** mode is enabled by default for safety\n6. Click the **Mount** 📂 button to mount the drive\n\n### 🔄 Mounting/Unmounting\n\n- **Mount**: Click the folder open icon (📂) next to the mount item\n- **Unmount**: Click the folder remove icon (🗑️) next to the mounted item\n  - Shows elapsed time during unmount: \"Unmounting Z:\\... (5s)\"\n  - If unmount takes longer than expected (\u003e10s), displays timeout dialog with options\n  - Can continue in background if needed\n\n### ❌ Removing a Mount\n\n1. Select an **unmounted** item from the list\n2. Click the **Remove** button\n\n\u003e 💡 **Tip**: You cannot remove a mounted drive. Unmount it first.\n\n### 🎯 System Tray\n\n- **Minimize**: Close the window to minimize to system tray (shows notification)\n- **Restore**: Click the tray icon or launch the application again\n- **Exit**: Right-click tray icon → Exit (prompts to unmount drives)\n\n### 🔐 Single Instance\n\nThe application runs as a single instance. If you try to launch it while already running:\n- If **visible**: Nothing happens (already running)\n- If **in tray**: Window automatically restores and comes to front\n\n## 🛠️ Building from Source\n\n### Prerequisites\n\n- 🔧 **Visual Studio 2022** or later (or VS Code with C# extension)\n- 🔷 **.NET 8.0 SDK** - [Download](https://dotnet.microsoft.com/download/dotnet/8.0)\n- 📦 **Dokan Driver** (for testing) - [Download](https://github.com/dokan-dev/dokany/releases)\n\n### Build Steps\n\n```bash\n# Clone the repository\ngit clone https://github.com/player-alex/dokan-mirror-manager.git\ncd dokan-mirror-manager\n\n# Restore dependencies\ndotnet restore\n\n# Build the project (Release configuration)\ndotnet build -c Release\n\n# Or build for x64 specifically\ndotnet build -c Release --arch x64\n```\n\n### Run from Source\n\n```bash\n# Run as Administrator (required for Dokan operations)\ndotnet run --project dokan-mirror-manager/dokan-mirror-manager.csproj\n```\n\n\u003e ⚠️ **Note**: Must be run as Administrator for Dokan operations.\n\n## ⚙️ Configuration\n\nMount configurations are automatically saved to `mounts.json` in the application directory.\n\n**Configuration includes:**\n- 📁 Source paths (supports environment variables)\n- 💾 Destination drive letters\n- 🤖 Auto-mount settings\n- 🔒 Read-only settings\n\nThe configuration file is created automatically on first mount and updated whenever changes are made.\n\n### Environment Variables\n\nYou can use Windows environment variables in source paths within `mounts.json`:\n\n```json\n[\n  {\n    \"SourcePath\": \"%USERPROFILE%\\\\Desktop\",\n    \"DestinationLetter\": \"Z:\\\\\",\n    \"AutoMount\": true,\n    \"IsReadOnly\": true\n  }\n]\n```\n\n**Supported variables:**\n- `%USERPROFILE%` - User's home directory\n- `%APPDATA%` - Application data folder\n- `%LOCALAPPDATA%` - Local application data folder\n- `%ProgramFiles%` - Program Files directory\n- `%TEMP%` - Temporary files directory\n- Any other Windows environment variables\n\n### Smart Drive Letter Management\n\nThe application automatically manages drive letters to prevent conflicts:\n- **Auto-Assignment**: Automatically assigns available drive letters when adding new mounts\n- **Conflict Resolution**: If a drive letter is already in use, automatically selects the next available one\n- **Duplicate Handling**: When loading from `mounts.json`, duplicates are automatically resolved\n- **Dynamic Updates**: Drive letter dropdowns update in real-time based on availability\n\n## 🔌 IPC API\n\nDokan Mirror Manager provides an IPC (Inter-Process Communication) API that allows external applications to query mount point information.\n\n### API Overview\n\nThe API uses Windows messages (`WM_COPYDATA`) and Named Pipes for communication:\n\n1. **Client** finds the application window by title: `\"Dokan Mirror Manager\"`\n2. **Client** sends `WM_COPYDATA` message with a unique pipe name\n3. **Server** responds via the specified Named Pipe with JSON data\n\n### Protocol Details\n\n**Message:** `WM_COPYDATA (0x004A)`\n- `dwData`: `0x8002` (WM_GET_MOUNT_POINTS)\n- `lpData`: UTF-16LE encoded pipe name (with null terminator)\n- `cbData`: Byte length of pipe name (including null terminator)\n\n**Response Format (JSON):**\n```json\n{\n  \"success\": true,\n  \"mountPoints\": [\n    {\n      \"srcPath\": \"C:\\\\SourceFolder\",\n      \"dstPath\": \"Z:\\\\\",\n      \"driveName\": \"SourceFolder\",\n      \"status\": \"Mounted\",\n      \"isReadOnly\": true,\n      \"autoMount\": false,\n      \"errorMessage\": \"\"\n    }\n  ],\n  \"timestamp\": \"2025-10-26T18:00:00.000Z\",\n  \"version\": \"1.0\"\n}\n```\n\n### Python Example\n\nSee [Examples/MountPointQuery/Python/mount_point_query_client.py](Examples/MountPointQuery/Python/mount_point_query_client.py) for a complete implementation:\n\n```python\nimport win32gui\nfrom ctypes import *\n\n# Find application window\nhwnd = win32gui.FindWindow(None, \"Dokan Mirror Manager\")\n\n# Create Named Pipe name\npipe_name = f\"DokanMirrorManager_Query_{uuid.uuid4().hex}\"\n\n# Send WM_COPYDATA request\n# ... (see example file for complete code)\n\n# Receive response via Named Pipe\n# Response contains JSON with mount point information\n```\n\n### C# Example\n\nSee [Examples/MountPointQuery/CSharp/TestSendCopyData/Program.cs](Examples/MountPointQuery/CSharp/TestSendCopyData/Program.cs) for a complete C# implementation.\n\n### Status Values\n\n| Status | Description |\n|--------|-------------|\n| `Unmounted` | Not currently mounted |\n| `Mounting` | Mount operation in progress |\n| `Mounted` | Successfully mounted |\n| `Unmounting` | Unmount operation in progress |\n| `Error` | Mount operation failed |\n\n### Security Notes\n\n- **UIPI (User Interface Privilege Isolation)**: The application uses `ChangeWindowMessageFilterEx` to allow `WM_COPYDATA` messages from processes with different privilege levels\n- **Named Pipes**: Each request uses a unique pipe name to prevent conflicts\n- **Timeout**: The server has a 10-second timeout for pipe connections\n\n## 🔧 Technologies Used\n\n| Technology | Purpose | Version |\n|------------|---------|---------|\n| [.NET](https://dotnet.microsoft.com/) | Application framework | 8.0 |\n| [WPF](https://docs.microsoft.com/en-us/dotnet/desktop/wpf/) | UI framework | - |\n| [Caliburn.Micro](https://caliburnmicro.com/) | MVVM framework | 5.0.258 |\n| [MahApps.Metro](https://mahapps.com/) | Modern UI toolkit | 2.4.11 |\n| [DokanNet](https://github.com/dokan-dev/dokan-dotnet) | .NET wrapper for Dokan | 2.3.0.1 |\n| [Hardcodet.NotifyIcon.Wpf](https://github.com/hardcodet/wpf-notifyicon) | System tray support | 2.0.1 |\n\n## 🐛 Troubleshooting\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e❌ Application crashes on mount\u003c/b\u003e\u003c/summary\u003e\n\n- ✅ Ensure Dokan Driver is properly installed\n- ✅ Run the application as Administrator\n- ✅ Check `mount_error.log` in the application directory for details\n- ✅ Verify the source path exists and is accessible\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e💾 Drive letter not available\u003c/b\u003e\u003c/summary\u003e\n\n- ✅ Make sure the drive letter is not already in use\n- ✅ Check Windows Disk Management for assigned letters\n- ✅ Try a different drive letter\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e🚫 Application won't start\u003c/b\u003e\u003c/summary\u003e\n\n- ✅ Verify .NET 8.0 Runtime is installed\n- ✅ Check `crash.log` in the application directory\n- ✅ Ensure you're running as Administrator\n- ✅ Try running from command line to see error messages\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e⚠️ Already running message appears\u003c/b\u003e\u003c/summary\u003e\n\nThis is normal behavior. The application uses single-instance mode:\n- If the window is hidden in tray, it will be restored automatically\n- If the window is already visible, the existing instance continues running\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e⏱️ Unmount is taking a long time\u003c/b\u003e\u003c/summary\u003e\n\nIf unmount takes longer than expected:\n- ✅ Close any programs accessing files on the drive (Explorer, cmd, etc.)\n- ✅ Wait for the timeout dialog to show processes using the drive\n- ✅ Choose to continue waiting or let it complete in background\n- ✅ The drive will unmount automatically when all file handles are released\n\n\u003c/details\u003e\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- [Dokan Project](https://github.com/dokan-dev/dokany) - User mode file system library for Windows\n- \u003ca href=\"https://www.flaticon.com/free-icons/web-server\" title=\"web server icons\"\u003eApplication icon created by Muhamad Ulum - Flaticon\u003c/a\u003e\n\n---","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplayer-alex%2Fdokan-mirror-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplayer-alex%2Fdokan-mirror-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplayer-alex%2Fdokan-mirror-manager/lists"}