MasterX1582/WinMCP

MCP Server to control Windows

★ 0Forks 0GitHub ↗Compare

README

WinMCP Installer

Professional Windows installer for WinMCP - Model Context Protocol Server for Windows.

What Gets Installed

  • ✅ WinMCP.exe - Single-file executable (~80 MB)
  • ✅ All .NET 8 runtime dependencies (self-contained)
  • ✅ Start Menu shortcuts (GUI mode and Network mode)
  • ✅ Optional desktop shortcut
  • ✅ Optional PATH environment variable entry
  • ✅ Uninstaller

Prerequisites

Install Inno Setup

Download and install Inno Setup (free):

Building the Installer

Quick Build (Automated)

# Navigate to installer directory
cd c:\Users\Davy\Documents\GitHub\WinMCP\installer

# Build everything (WinMCP + Installer)
.\build-installer.ps1

# Or skip WinMCP build if already built
.\build-installer.ps1 -SkipBuild

# Build and test installation
.\build-installer.ps1 -TestInstall

The installer will be created at:

installer\output\WinMCP-Setup-v1.0.0.exe

Manual Build

  1. Build WinMCP as single-file executable:
cd c:\Users\Davy\Documents\GitHub\WinMCP
dotnet publish WinMCP.csproj -c Release -r win-x64 --self-contained `
  -p:PublishSingleFile=true `
  -p:IncludeNativeLibrariesForSelfExtract=true `
  -p:EnableCompressionInSingleFile=true
  1. Open Inno Setup Compiler
  2. Open WinMCP-Setup.iss
  3. Click Build → Compile (F9)

Installer Features

What Users See

  1. Welcome Screen - Introduction to WinMCP
  2. Select Destination - Default: C:\Program Files\WinMCP
  3. Select Additional Tasks:
    • Create desktop icon (optional)
    • Add WinMCP to system PATH (optional, unchecked by default)
  4. Ready to Install - Confirmation
  5. Installing - Progress bar
  6. Finish - Option to launch WinMCP

Start Menu Shortcuts

After installation, users get:

  • WinMCP - Opens GUI mode
  • WinMCP (Network Mode) - Starts network server on port 3000
  • Uninstall WinMCP

System Requirements

  • Windows 10 or Windows 11 (64-bit)
  • ~100 MB disk space
  • No additional dependencies (self-contained)

Distribution

File Size

  • WinMCP.exe (standalone): ~80 MB
  • WinMCP-Setup.exe (installer): ~52 MB (compressed)
  • Installed size: ~80 MB

For End Users

Option 1: Installer (Recommended)

  • Download WinMCP-Setup-v1.0.0.exe
  • Double-click to install
  • Use Start Menu shortcuts

Option 2: Portable (No installer)

  • Download WinMCP.exe from bin\Release\net8.0-windows\win-x64\publish\
  • Run directly (no installation needed)

Customization

Change Version Number

Edit line 5 in WinMCP-Setup.iss:

#define MyAppVersion "1.0.0"

Modify Default Installation Path

Edit line 20:

DefaultDirName={autopf}\WinMCP

Add Custom Icon

The installer uses winmcp.ico from the root directory. To change it, edit line 33:

SetupIconFile=your-custom-icon.ico

Testing

Test Installation

# Run installer
.\output\WinMCP-Setup-v1.0.0.exe

# Verify installation
Test-Path "C:\Program Files\WinMCP\WinMCP.exe"

# Test WinMCP
& "C:\Program Files\WinMCP\WinMCP.exe" --help

# Test uninstall
# Settings → Apps → WinMCP → Uninstall

Silent Installation (for automation)

# Silent install
.\WinMCP-Setup-v1.0.0.exe /VERYSILENT /SUPPRESSMSGBOXES

# Silent install with PATH
.\WinMCP-Setup-v1.0.0.exe /VERYSILENT /TASKS="addtopath"

# Silent uninstall
& "C:\Program Files\WinMCP\unins000.exe" /VERYSILENT

Code Signing (Production)

For production releases, sign the installer:

  1. Obtain a code signing certificate from:

    • DigiCert
    • Sectigo
    • GlobalSign
  2. Add to Inno Setup script:

[Setup]
SignTool=signtool /f "path\to\certificate.pfx" /p "password" $f
SignedUninstaller=yes
  1. Or sign after build:
signtool sign /f "certificate.pfx" /p "password" `
  /t http://timestamp.digicert.com `
  .\output\WinMCP-Setup-v1.0.0.exe

Troubleshooting

Build Errors

"WinMCP.exe not found"

  • Ensure WinMCP is built first: dotnet publish ...
  • Check path in script matches your setup

"Inno Setup not found"

"Icon file not found"

  • Ensure winmcp.ico exists in root directory
  • Or comment out SetupIconFile line in .iss file

Installation Issues

SmartScreen Warning

  • Normal for unsigned executables
  • Click "More info → Run anyway"
  • For production: Code-sign the installer

Installation fails

  • Run with /LOG="setup.log" for detailed log
  • Check if antivirus is blocking

PATH not updated

  • Restart terminal/PowerShell after installation
  • Or log out and log back in

File Structure

WinMCP/
├── installer/
│   ├── WinMCP-Setup.iss       # Inno Setup script
│   ├── build-installer.ps1    # Automated build script
│   ├── README.md              # This file
│   └── output/
│       └── WinMCP-Setup-v1.0.0.exe  # Generated installer
├── bin/Release/net8.0-windows/win-x64/publish/
│   └── WinMCP.exe             # Source executable
└── winmcp.ico                 # Application icon

Release Checklist

  • Build WinMCP as single-file executable
  • Test WinMCP standalone
  • Build installer
  • Test installer on clean VM
  • Verify all shortcuts work
  • Test uninstaller
  • (Optional) Code-sign installer
  • Upload to distribution server
  • Update documentation with download link

Support

For issues or questions:

Contributors

MasterX1582

Issues