w10install/optional/install-irfanview.cmd

133 lines
1.5 KiB
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
2023-01-19 22:54:18 +01:00
set ZIP=..\software\iview-plugins.zip
2022-11-13 22:12:39 +01:00
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-16 17:19:18 +01:00
start /wait %EXE% /silent /desktop=1 /thumbs=1 /folder="%TARGET%" /group=1 /allusers=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 ...
2023-01-15 17:52:06 +01:00
mkdir %STARTMENU%\IrfanView 2>nul
move /Y "%PUBLIC%\Desktop\IrfanView*.lnk" %STARTMENU%\IrfanView
2022-11-13 22:12:39 +01:00
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
2023-01-19 17:01:54 +01:00
)
2023-01-19 22:54:18 +01:00
if EXIST %ZIP% (
echo extracting and installing PDF plugin ...
7z -o"%TARGET%"\Plugins x %ZIP% PDF.dll
)
2022-11-13 22:12:39 +01:00
echo ####### %0 #######
pause