@echo off call check-for-admin if %ERRORLEVEL% neq 0 exit /b set EXE=..\software\iview-setup.exe set ZIP=..\software\iview-plugins.zip set STARTMENU="%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs" set TARGET=%PROGRAMFILES%\IrfanView if NOT EXIST %EXE% ( echo ERROR: %EXE% not found! pause exit /b ) echo ####### %0 ####### echo installing IrfanView ... start /wait %EXE% /silent /desktop=1 /thumbs=1 /folder="%TARGET%" /group=1 /allusers=1 echo removing IrfanView startmenu folder ... rd /S /Q %STARTMENU%\"IrfanView" 2>nul echo moving IrfanView desktop links to Startmenu ... mkdir %STARTMENU%\IrfanView 2>nul move /Y "%PUBLIC%\Desktop\IrfanView*.lnk" %STARTMENU%\IrfanView rem refresh desktop (W10 style) ie4uinit.exe -show for %%A in ( acr ani b3d bmp dib clp crw cr2 cr3 cur dcm ima dcx dds djvu iw44 dxf ecw emf eps ps exr g3 gif hdp jxr wdp heic ico iff lbm jls jp2 jpc j2k jpg jpeg jpe jpm mng jng pbm pcd pcx pgm png ppm psd psp ras sun raw rle sff sgi rgb sid tga tif tiff wbmp webp wmf xbm xpm swf flv ttf asf avi mpg mpe mpeg mov wmv aif mid rmi mp3 ogg au snd wav wma ) do ( echo registering file type [ .%%A ] ... sfta --reg "%TARGET%\i_view64.exe" ".%%A ) if EXIST %ZIP% ( echo extracting and installing PDF plugin ... 7z -o"%TARGET%"\Plugins x %ZIP% PDF.dll ) echo ####### %0 ####### pause