msiexec /i 7z920-x64.msi /q
@Echo off
Set "cmpn=7z#0 arj#4 bz2#2 bzip2#2 cab#7 cpio#12 deb#11 dmg#17 fat#21 gz#14 gzip#14 hfs#18 iso#8 lha#6 lzh#6 lzma#16 ntfs#22 rar#3 rpm#10 split#9 swm#15 tar#13 taz#5 tbz#2 tbz2#2 tgz#14 tpz#14 vhd#20 wim#15 xar#19 xz#23 z#5 zip#1"
For %%I In (%cmpn%) Do For /F "tokens=1* Delims=#" %%a In ("%%I") Do Call :ass_set %%a %%b
Exit
:ass_set
reg add "HKCR\.%1" /ve /t REG_SZ /d "7-Zip.%1" /f>Nul
reg add "HKCR\7-Zip.%1" /ve /t REG_SZ /d "%1 Archive" /f>Nul
reg add "HKCR\7-Zip.%1\DefaultIcon" /ve /t REG_SZ /d "%PROGRAMFILES%\7-Zip\7z.dll,%2" /f>Nul
reg add "HKCR\7-Zip.%1\shell" /ve /t REG_SZ /d "" /f>Nul
reg add "HKCR\7-Zip.%1\shell\open" /ve /t REG_SZ /d "" /f>Nul
reg add "HKCR\7-Zip.%1\shell\open\command" /ve /t REG_SZ /d "\"%PROGRAMFILES%\7-Zip\7zFM.exe\" \"%%1\"" /f>Nul
GoTo :EOF