Skip to main content
The igcmd.exe command-line tool provides powerful automation capabilities for ImageGlass, enabling you to integrate image viewing features into scripts, workflows, and system operations.

Getting Started

The igcmd tool is located in your ImageGlass installation directory (typically C:\Program Files\ImageGlass\).

Basic Usage

igcmd.exe <command> [arguments] [options]

Available Commands

ImageGlass CLI provides 14 commands organized by functionality:

Quick Setup & Configuration

  • quick-setup - Launch the quick setup wizard
  • check-for-update - Check for ImageGlass updates

Wallpaper & Lock Screen

  • set-wallpaper - Set an image as desktop wallpaper
  • set-lock-screen - Set an image as Windows lock screen

File Associations

  • set-default-viewer - Register ImageGlass as default photo viewer
  • remove-default-viewer - Unregister ImageGlass as default photo viewer

Image Operations

  • export-frames - Export frames from animated images
  • lossless-compress - Compress images without quality loss
  • start-slideshow - Start a slideshow from a specific image

Customization

  • install-languages - Install language packs
  • install-themes - Install theme packs
  • uninstall-theme - Remove a theme pack

Performance

  • set-startup-boost - Enable startup boost (launch with Windows)
  • remove-startup-boost - Disable startup boost

Global Options

These options can be used with most commands:
--ui
flag
Show UI dialogs for success/error messages
--per-machine
flag
Apply settings system-wide (requires administrator privileges)
--hide-admin-error-ui
flag
Suppress administrator permission error dialogs

Exit Codes

All igcmd commands return standard exit codes:
CodeNameDescription
0DoneCommand completed successfully
1AdminRequiredAdministrator privileges required
2ErrorGeneral error occurred
3Error_FileNotFoundSpecified file not found

Checking Exit Codes

# Windows Command Prompt
igcmd.exe set-wallpaper "image.jpg" Centered
echo %ERRORLEVEL%

# PowerShell
igcmd.exe set-wallpaper "image.jpg" Centered
echo $LASTEXITCODE

Command Reference

For detailed documentation of each command, see:

All Commands

Complete reference of all 14 commands

Quick Setup

Initial configuration wizard

Set Wallpaper

Desktop wallpaper management

File Associations

Default photo viewer registration

Export Frames

Extract frames from animations

Examples

Set wallpaper and check result

igcmd.exe set-wallpaper "C:\Photos\landscape.jpg" Stretched
if %ERRORLEVEL% EQU 0 (
    echo Wallpaper set successfully
) else (
    echo Failed to set wallpaper
)

Install multiple themes

igcmd.exe install-themes "theme1.igtheme" "theme2.igtheme" --ui

Set default viewer with confirmation

igcmd.exe set-default-viewer ".jpg;.png;.gif" --ui --per-machine

Error Handling

When using igcmd in scripts, always check exit codes:
@echo off
igcmd.exe set-wallpaper "photo.jpg" Centered

if %ERRORLEVEL% EQU 1 (
    echo Administrator privileges required
    echo Please run as administrator
    exit /b 1
)

if %ERRORLEVEL% EQU 3 (
    echo File not found: photo.jpg
    exit /b 1
)

if %ERRORLEVEL% NEQ 0 (
    echo An error occurred
    exit /b 1
)

echo Success!

Configuration Files

Some commands can be configured using ImageGlass configuration files:
  • User settings: %APPDATA%\ImageGlass\Config\
  • Machine settings: %ProgramData%\ImageGlass\Config\
Use the --per-machine flag to modify system-wide settings (requires admin rights).

See Also

Build docs developers (and LLMs) love