set-default-viewer
Register ImageGlass as the default photo viewer for specified file extensions.Syntax
Parameters
string
default:"all supported formats"
Semicolon-separated list of file extensions to registerFormat:
.ext1;.ext2;.ext3Examples:.jpg;.png;.gif- Common web formats.jpg;.jpeg;.png;.bmp- Basic image formats.webp;.avif;.heic- Modern formats
flag
Apply registration system-wide for all usersRequires: Administrator privilegesWithout this flag: Registration applies to current user only
flag
Show confirmation dialog on successful registrationDisplays a user-friendly message with registration details
Exit Codes
Examples
Register All Supported Formats
Register Specific Formats
System-Wide Registration
With User Confirmation
Complete Registration with UI
Common Extension Sets
Basic Image Formats
Modern Web Formats
RAW Photography Formats
All Common Formats
Advanced Usage
Installation Script
System Deployment Script
PowerShell Registration
remove-default-viewer
Unregister ImageGlass as the default photo viewer for specified file extensions.Syntax
Parameters
string
default:"all registered formats"
Semicolon-separated list of file extensions to unregisterFormat:
.ext1;.ext2;.ext3If omitted, all registered formats are unregistered.flag
Remove system-wide registration for all usersRequires: Administrator privileges
flag
Show confirmation dialog on successful removal
Exit Codes
Examples
Remove All Associations
Remove Specific Formats
System-Wide Removal
With Confirmation Dialog
Advanced Usage
Uninstall Script
Clean Removal Script
PowerShell Removal
Understanding File Associations
Per-User vs Per-Machine
Per-User Registration (Default)
- Applies to current user only
- No administrator privileges required
- Stored in
HKEY_CURRENT_USERregistry - Does not affect other users
- Preferred for personal installations
Per-Machine Registration
- Applies to all users on the system
- Requires administrator privileges
- Stored in
HKEY_LOCAL_MACHINEregistry - Affects all user accounts
- Preferred for enterprise deployments
Supported Image Formats
When registering without specifying extensions, ImageGlass registers for all supported formats:- Raster: JPG, PNG, GIF, BMP, TIFF, WebP, AVIF, HEIC, HEIF
- Vector: SVG
- Icons: ICO, CUR
- RAW: CR2, NEF, ARW, DNG, RAF, ORF (with codecs)
- Other: TGA, PCX, PSD (preview)
Windows Default Apps
After registration:- ImageGlass appears in Windows “Default apps” settings
- Users can still manually change associations in Settings
- Registration creates the necessary registry entries
- Does not override user’s explicit manual choices