w10install/optional/install-irfanview.cmd

32 lines
704 B
Batchfile
Raw Normal View History

2022-11-13 22:12:39 +01:00
@echo off
call check-for-admin
if %ERRORLEVEL% neq 0 exit /b
2022-11-13 22:12:39 +01:00
set EXE=..\software\iview-setup.exe
set STARTMENU="%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs"
2023-01-14 17:15:31 +01:00
set TARGET=%PROGRAMFILES%\IrfanView
2022-11-13 22:12:39 +01:00
if NOT EXIST %EXE% (
echo ERROR: %EXE% not found!
pause
exit /b
)
echo ####### %0 #######
echo installing IrfanView ...
2023-01-14 17:15:31 +01:00
start /wait %EXE% /silent /desktop=1 /thumbs=1 /folder="%TARGET%" /group=1 /allusers=1 /assoc=1
2022-11-13 22:12:39 +01:00
echo removing IrfanView startmenu folder ...
rd /S /Q %STARTMENU%\"IrfanView" 2>nul
echo moving IrfanView desktop links to Startmenu ...
move /Y "%PUBLIC%\Desktop\IrfanView*.lnk" %STARTMENU%
rem refresh desktop (W10 style)
ie4uinit.exe -show
echo ####### %0 #######
pause