# Install ImageGlass and set file associations { pkgs, makeFilesISO, ... }: let installer = pkgs.fetchurl { url = "https://github.com/d2phap/ImageGlass/releases/download/9.4.1.15/ImageGlass_9.4.1.15_x64.msi"; hash = "sha256-o7q+5XpGLK+P/GQxvN/Ud5w1NxPpJ24AL54HNwda32Q="; }; assocReg = ./imageglass-file-associations.reg; in { name = "imageglass"; cdroms = [ (makeFilesISO { name = "imageglass"; files = [ installer assocReg ]; }) ]; auditScript = '' @echo off echo Installing ImageGlass... msiexec /i "D:\ImageGlass_9.4.1.15_x64.msi" /qn /norestart ALLUSERS=1 echo Importing ImageGlass file associations... regedit /s "D:\imageglass-file-associations.reg" :: delete shortcut on desktop del /q "C:\Users\Public\Desktop\ImageGlass.lnk" :: Remove Paint Brush class registration reg delete "HKLM\SOFTWARE\Classes\PBrush" /f 2>nul ''; }