Jump to content

Install 7zip silently with file associations


muchlux

Recommended Posts

Hi,

I know there are many threads about installing 7zip silently, but none with file associations.

Registry import doesn't work because absolute paths are stored!

Does anybody have a working AUTOIT script?

(I am not very skilled in coding scripts)

Link to comment
Share on other sites


Thanks,

but unfortunately all paths are hardcoded inside reg-file so it won't work with non english installation etc.

also this takes no effect until restart.

This is why I am looking for an AUTOIT or similar.

Link to comment
Share on other sites

Here's the dirty way of doing it. You can have AutoIt write all of the values to the registry without using absolute paths. I'd love to do this for you but it'd take too long.

RunWait('7z442.exe /S')
sleep(200)
Run(@ProgramFilesDir & '\7-Zip\7zFM.exe')
WinWait('7-Zip File Manager', '')
WinActivate('7-Zip File Manager', '')
Send('!T')
Sleep(100)
Send('O')
WinWait('Options', '')
sleep(200)
ControlClick('Options', '', 1023)
ControlClick('Options', '', 'Button2')
WinWait('7-Zip File Manager', '')
WinClose('7-Zip File Manager', '')

Edited by redfive19
Link to comment
Share on other sites

I prefer use original .msi if switchs exist for extensions because I'm french ... but if doesn't exist I have already a regtweaks ... but it's always best to use original setup options to keep more compatibilty in the future.

Link to comment
Share on other sites

This au3 script should work for german version:

BlockInput(1)

Run(@ProgramFilesDir & '\7-Zip\7zFM.exe')

sleep(500)

If WinExists("7-Zip Dateimanager") Then

WinActivate('7-Zip Dateimanager', '')

Send('!E')

Sleep(100)

Send('O')

WinWait('Optionen', '')

sleep(200)

ControlClick('Optionen', '', 1023)

ControlClick('Optionen', '', 'Button1')

ControlClick('Optionen', '', 1)

ControlClick('Optionen', '', 'Button2')

WinWait('7-Zip Dateimanager', '')

WinClose('7-Zip Dateimanager', '')

EndIf

BlockInput(0)

Nevertheless I still need some reg tweaks for default compressing settings, visible grid lines etc...

but this script enables all archive associations without the need of reboot.

Link to comment
Share on other sites

Based on this post below for registering

IZArc

How about...

@ECHO OFF
CMDOW @ /HID
SETLOCAL
SET SC=HKLM\SOFTWARE\Classes
SET Extn=001 7z arj bz2 cab chm cpio deb gz iso lzh nsis rar rpm tar z zip
FOR %%i IN (%Extn%) DO (REG ADD %SC%\.%%i /VE /D "7-Zip.%%i" /F)
FOR %%j IN (%Extn%) DO (
REG ADD %SC%\7-Zip.%%j /VE /D "7z Archive" /F
REG ADD %SC%\7-Zip.%%j\DefaultIcon /VE /D "\"%PROGRAMFILES%\7-Zip\Formats\%%j.dll\"" /F
REG ADD %SC%\7-Zip.%%j\shell\open\command /VE /D "\"%PROGRAMFILES%\7-Zip\7zFM.exe\" \"%%1\"" /F
)
REG ADD %SC%\7-Zip.001\DefaultIcon /VE /D "\"%PROGRAMFILES%\7-Zip\Formats\split.dll\"" /F
ENDLOCAL
EXIT

It's not autoit but will that do?

:EDIT:

simplified the script a bit.

Edited by jaws75
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...