This guide covers creating professional MSI installers for Speech2Text that provide a complete Windows installation experience.
# Build MSI using WiX Toolset
python build_msi_simple.py# Build MSI using cx_Freeze
python build_msi.py# Double-click or run:
build_msi.bat-
WiX Toolset v3.11+
- Download: https://wixtoolset.org/
- Or install via winget:
winget install Microsoft.WiX - Or install via chocolatey:
choco install wixtoolset
-
Python Dependencies (auto-installed)
uv add pyinstaller # For building the EXE first
- cx_Freeze (auto-installed by script)
uv add cx_Freeze
Steps:
- Build EXE: Creates standalone executable using PyInstaller
- Generate WiX Config: Creates speech2text.wxs with installer configuration
- Compile: Uses
candle.exeto compile WiX source - Link: Uses
light.exeto create final MSI
Features:
- β Professional Windows installer UI
- β Start Menu and Desktop shortcuts
- β Add/Remove Programs integration
- β Upgrade support with proper GUIDs
- β Option to launch after installation
- β Registry entries for proper uninstall
Steps:
- Configure: Creates setup_msi.py with cx_Freeze configuration
- Build EXE: Creates executable with cx_Freeze
- Build MSI: Generates MSI installer directly
Features:
- β Python-native MSI creation
- β All dependencies bundled
- β Desktop shortcut creation
- β Program Files installation
After building, you'll find:
dist/
βββ Speech2Text.msi # MSI installer (recommended for distribution)
βββ Speech2Text.exe # Standalone executable (backup option)
βββ [other build files]
- Welcome Dialog: Professional installer welcome screen
- License Agreement: MIT license display
- Installation Directory: Customizable install location (default: Program Files)
- Feature Selection: Choose components to install
- Progress Display: Real-time installation progress
- Completion: Option to launch application after install
- Start Menu: Creates "Speech2Text" program group
- Desktop Shortcut: Optional desktop shortcut
- Add/Remove Programs: Proper Windows uninstall support
- Registry Entries: Clean installation tracking
- File Associations: Future expansion capability
- Version Detection: Detects existing installations
- Upgrade Path: Smooth upgrades without losing settings
- Uninstall Cleanup: Complete removal of all components
| File Type | Size | Description |
|---|---|---|
| EXE (standalone) | ~31 MB | Single executable file |
| MSI (installer) | ~32 MB | Complete installer package |
| Installed Size | ~35 MB | After installation on disk |
- Download: Provide the
.msifile - Install: Double-click to run installer
- Configure: Enter OpenAI API key on first run
- Use: Launch from Start Menu or Desktop
# Silent installation
msiexec /i Speech2Text.msi /quiet
# Silent installation with log
msiexec /i Speech2Text.msi /quiet /l*v install.log
# Uninstall silently
msiexec /x Speech2Text.msi /quietEdit build_msi_simple.py to customize:
# Change installation directory
<Directory Id="INSTALLFOLDER" Name="YourAppName" />
# Modify shortcuts
<Shortcut Id="ApplicationStartMenuShortcut"
Name="Your App Name"
Description="Your Description" />
# Update product information
<Product Id="{GUID}"
Name="Your Product Name"
Manufacturer="Your Company" />- Create
.icofile - Place in project root
- Update scripts:
icon="path/to/your/icon.ico"
- Multiple Components: Add optional features
- Custom Actions: Run scripts during install/uninstall
- System Requirements: Check Windows version, .NET, etc.
- License Agreement: Custom license text
For professional distribution, sign your MSI:
# Using signtool.exe (Windows SDK)
signtool sign /f certificate.pfx /p password /t http://timestamp.server Speech2Text.msiBenefits:
- β Removes "Unknown Publisher" warnings
- β Builds user trust
- β Required for some corporate environments
"WiX Toolset not found"
- Install WiX Toolset from https://wixtoolset.org/
- Ensure
candle.exeandlight.exeare in PATH
"Build failed with exit code 1"
- Check that
dist/Speech2Text.exeexists - Verify all file paths in WiX configuration
- Check Windows Event Viewer for detailed errors
"MSI installation fails"
- Run as Administrator
- Check Windows Installer service is running
- Verify sufficient disk space
"Application won't start after install"
- Check installed files in Program Files
- Verify all dependencies are included
- Test with antivirus temporarily disabled
# Verbose cx_Freeze build
python setup_msi.py build --verbose
# WiX verbose output
candle speech2text.wxs -v
light speech2text.wixobj -v-
Update
pyproject.toml:version = "0.2.0"
-
Update build scripts:
version = "0.2.0"
-
Generate new upgrade GUID for major versions
- Test: Verify application works
- Build: Create new MSI
- Test Install: Test on clean system
- Sign: Code sign if needed
- Distribute: Upload to release platform
- Check Python version compatibility
- Verify all dependencies installed
- Review build script error messages
- Test on multiple Windows versions
- Check antivirus software compatibility
- Verify system requirements met
- Include all required DLLs
- Test with minimal Windows installation
- Check OpenAI API connectivity
MSI installer inherits the MIT license from the main application.
Next Steps: After creating your MSI, test it on a clean Windows system to ensure proper installation and functionality.