set-filetypes.cmd integrated in logon.cmd
This commit is contained in:
parent
e3bf9e56bd
commit
61c095e67e
@ -5,7 +5,7 @@ if %ERRORLEVEL% neq 0 exit /b
|
|||||||
set EXE=..\software\iview-setup.exe
|
set EXE=..\software\iview-setup.exe
|
||||||
set ZIP=..\software\iview-plugins.zip
|
set ZIP=..\software\iview-plugins.zip
|
||||||
set STARTMENU="%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs"
|
set STARTMENU="%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs"
|
||||||
set TARGET=%PROGRAMFILES%\IrfanView
|
set TARGET="%PROGRAMFILES%\IrfanView"
|
||||||
|
|
||||||
if NOT EXIST %EXE% (
|
if NOT EXIST %EXE% (
|
||||||
echo ERROR: %EXE% not found!
|
echo ERROR: %EXE% not found!
|
||||||
@ -16,7 +16,7 @@ if NOT EXIST %EXE% (
|
|||||||
echo ####### %0 #######
|
echo ####### %0 #######
|
||||||
|
|
||||||
echo installing IrfanView ...
|
echo installing IrfanView ...
|
||||||
start /wait %EXE% /silent /desktop=1 /thumbs=1 /folder="%TARGET%" /group=1 /allusers=1
|
start /wait %EXE% /silent /desktop=1 /thumbs=1 /folder=%TARGET% /group=1 /allusers=1
|
||||||
|
|
||||||
echo removing IrfanView startmenu folder ...
|
echo removing IrfanView startmenu folder ...
|
||||||
rd /S /Q %STARTMENU%\"IrfanView" 2>nul
|
rd /S /Q %STARTMENU%\"IrfanView" 2>nul
|
||||||
@ -28,103 +28,9 @@ move /Y "%PUBLIC%\Desktop\IrfanView*.lnk" %STARTMENU%\IrfanView
|
|||||||
rem refresh desktop (W10 style)
|
rem refresh desktop (W10 style)
|
||||||
ie4uinit.exe -show
|
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% (
|
if EXIST %ZIP% (
|
||||||
echo extracting and installing PDF plugin ...
|
echo extracting and installing PDF plugin ...
|
||||||
7z -o"%TARGET%"\Plugins x %ZIP% PDF.dll
|
7z -o%TARGET%\Plugins -aoa x %ZIP% PDF.dll
|
||||||
)
|
)
|
||||||
|
|
||||||
echo ####### %0 #######
|
echo ####### %0 #######
|
||||||
|
@ -28,9 +28,6 @@ echo removing Desktop icons ...
|
|||||||
del /F "%PUBLIC%\Desktop\PDF24.lnk" 2>nul
|
del /F "%PUBLIC%\Desktop\PDF24.lnk" 2>nul
|
||||||
del /F "%USERPROFILE%\Desktop\Online PDF Tools.url" 2>nul
|
del /F "%USERPROFILE%\Desktop\Online PDF Tools.url" 2>nul
|
||||||
|
|
||||||
echo registering file type [ .pdf ] ...
|
|
||||||
sfta --reg "%PROGRAMFILES%\PDF24\pdf24-Reader.exe" ".pdf
|
|
||||||
|
|
||||||
echo refreshing desktop (W10 style) ...
|
echo refreshing desktop (W10 style) ...
|
||||||
ie4uinit.exe -show
|
ie4uinit.exe -show
|
||||||
|
|
||||||
|
69
scripts/set-filetypes.cmd
Normal file
69
scripts/set-filetypes.cmd
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
echo ####### %0 #######
|
||||||
|
|
||||||
|
set AKA=irfanview
|
||||||
|
set BINARY="%PROGRAMFILES%\IrfanView\i_view64.exe"
|
||||||
|
set SUFFIX=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
|
||||||
|
call :SFTA
|
||||||
|
|
||||||
|
set AKA=PDF24
|
||||||
|
set BINARY="%PROGRAMFILES%\PDF24\pdf24-Reader.exe"
|
||||||
|
set SUFFIX=pdf
|
||||||
|
call :SFTA
|
||||||
|
|
||||||
|
set AKA=Presentations
|
||||||
|
set BINARY="%PROGRAMFILES%\Softmaker Office 2021\Presentations.exe"
|
||||||
|
set SUFFIX=ppt pptx
|
||||||
|
call :SFTA
|
||||||
|
|
||||||
|
set AKA=PlanMaker
|
||||||
|
set BINARY="%PROGRAMFILES%\Softmaker Office 2021\Planmaker.exe"
|
||||||
|
set SUFFIX=xls xlsx
|
||||||
|
call :SFTA
|
||||||
|
|
||||||
|
set AKA=TextMaker
|
||||||
|
set BINARY="%PROGRAMFILES%\Softmaker Office 2021\Textmaker.exe"
|
||||||
|
set SUFFIX=doc docx
|
||||||
|
call :SFTA
|
||||||
|
|
||||||
|
rem refresh desktop (W10 style)
|
||||||
|
ie4uinit.exe -show
|
||||||
|
|
||||||
|
goto :END
|
||||||
|
|
||||||
|
rem ####################################################
|
||||||
|
rem set filetypes with tool "sfta" ...
|
||||||
|
|
||||||
|
:SFTA
|
||||||
|
set FILETYPE_DONE="%LOCALAPPDATA%\.filetype_done.%AKA%"
|
||||||
|
|
||||||
|
if NOT EXIST %BINARY% (
|
||||||
|
echo INFO: [ %BINARY% ] is not installed.
|
||||||
|
goto :eof
|
||||||
|
) else (
|
||||||
|
echo working on [ %AKA% ] ...
|
||||||
|
)
|
||||||
|
|
||||||
|
if NOT EXIST %FILETYPE_DONE% (
|
||||||
|
for %%A in (
|
||||||
|
%SUFFIX%
|
||||||
|
) do (
|
||||||
|
echo registering file type [ .%%A ] for [ %AKA% ]...
|
||||||
|
sfta --reg %BINARY% .%%A
|
||||||
|
)
|
||||||
|
rem create a statusfile ...
|
||||||
|
echo 1 >%FILETYPE_DONE%
|
||||||
|
)
|
||||||
|
|
||||||
|
goto :eof
|
||||||
|
|
||||||
|
rem ####################################################
|
||||||
|
|
||||||
|
:END
|
||||||
|
echo ####### %0 #######
|
||||||
|
|
@ -73,6 +73,10 @@ echo.
|
|||||||
powershell -command %TOOLS%\scripts\set-recyclebin.ps1
|
powershell -command %TOOLS%\scripts\set-recyclebin.ps1
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
|
rem set filetype associations ...
|
||||||
|
call %TOOLS%\scripts\set-filetypes.cmd
|
||||||
|
echo.
|
||||||
|
|
||||||
echo Remapping Desktop folder to standard location ...
|
echo Remapping Desktop folder to standard location ...
|
||||||
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" ^
|
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" ^
|
||||||
/v Desktop /t REG_EXPAND_SZ /d "%USERPROFILE%\Desktop" /f 1>nul
|
/v Desktop /t REG_EXPAND_SZ /d "%USERPROFILE%\Desktop" /f 1>nul
|
||||||
|
Loading…
Reference in New Issue
Block a user