Categories
Windows

Set double-click a ZIP archive file to automatically extract/unzip it in Windows 10

Set double-click a ZIP archive file to automatically extract/unzip it in Windows 10

If you are for example a long time user of a Mac, then you have probably got used extracting/unzipping ZIP-files (or RAR-files or other archive packages files) by just double-clicking the file. But in Windows, if you double-click an ZIP file, you will open an extract dialog window, where you have to confirm where you want to extract the ZIP archive. Or you can right click the ZIP file and choose the option “Extract Here” to extract it. But after using a Mac for many years, the double-clicking habbit has become basically a muscle memory for me unfortunately. In this article I will show quickly how to change this default behaviour of Windows with 7-Zip and some register changes.

 

First we will install 7-Zip (https://www.7-zip.org/) and we will open the 7-Zip File Manager as an administrator. Then go to “Tools” -> “Options” and choose the file types that you want to 7-Zip to extract. For example I associated ZIP and RAR, as I mostly work with them. For both these file types, I associated both my user account and all accounts

.

Next we will run RegEdit run as an administrator. Locate the following key:

HKEY_CLASSES_ROOT/7-Zip.zip

 

Then there should be a “shell” subfolder under the 7-Zip.zip. When you click the subfolder, you should see on the right side panel the key “(default)”. Double-click the “(default)”. And in the new dialog window write:

extract

 

Next right click the “shell”-folder on the left side panel and create a new key. Give this name “extract”. And then select the new “extract” folder. And then double-click “(default)”. In the dialog window write “Extract to Folder”.

Extract to Folder

 

Finally select the “extract” folder on the left side panel. Then right click it and create a folder named “command”.Select the “command” folder. Then right click the “(default)”. And in that dialog window write:

C:\Program Files\7-Zip\7zG.exe x “%1” -o*

 

If your 7-Zip installation isn’t in the default path, then replace the path with your own.

If you assiociated other file formats than ZIPs at the beginning in 7-Zip File Manager, then you need to repeat the the register change for them also. You will find them in HKEY_CLASSES_ROOT/7-Zip.archivetype. So for example in my case I also chose RAR-files, so I will need to make changes also to HKEY_CLASSES_ROOT/7-Zip.rar

Sources:

Categories
Windows

How to use package manager Winget, Apt or Homebrew

How to use package manager Winget, Apt or Homebrew

In this article I will quickly tell what a package manager is and list common package manager commands that you can use with Winget on Windows, Apt (Apt-Get) on Linux and Homebrew on Mac (an unofficial package manager for Mac). I won’t go through in-depth the differences of the different package manager and how they work in this article. If you need to go back and forth between different package managers or you aren’t familiar with one of the package manager listed here, you might find this article useful.

Those of you that don’t know what a package manager is (especially users from Windows): A package manager allows you to install new apps quickly through command line. So you don’t need to go to every app companies’ web-site to download their apps. Especially if you need to quickly install a lot of apps at once (for example you are reinstalling your computer). It’s also a centered approach to update all your apps. Recently Microsoft has released their own package manager called Winget. It isn’t still yet completely finished, but there’s already more apps available there than in Microsoft Store. You can install the new package manager for example from directly downloading from Microsoft’s github: https://github.com/microsoft/winget-cli/releases

Search for apps:

How to search for an app if it is available in your package manager’s repositories:

# Winget
winget search appname
 
# Apt
apt search appname
 
# Homebrew
brew search appname

 

Installing apps:

Install an app:

# Winget
winget install appname
 
# Apt
apt install appname
 
# Homebrew
brew install appname

 

List all installed apps

List all installed apps. For Homebrew, this command will list all apps that you have listed through Homebrew (not the apps that you have installed through other ways). But for example Winget will list all the apps that are installed in your Windows (not just apps through Winget, so you will see for example Windows Updates there also). Because of this it might not be so useful to see quickly, if you have installed some app before. But you can use in “winget list appname”, to see if you have already installed the app or not.

# Winget
winget list
 
# Homebrew
brew list

 

List only a spesific app

If you don’t want the whole list of all the installed, you can also only list a specific app. For example if you just want to know, if some certain app is installed or not.

# Winget
winget list appname

# Homebrew (formulae)
brew list appname

# Homebrew (cask)
brew list --cask appname
 
 
 

Updating and upgrading apps (in Apt and Homebrew)

In Apt and in Homebrew you can easily update all your apps at the same time. But first you need to update your package manager’s database (so the package manager knows, if there’s an updates or not). After that you can run the upgrade command to install the updates. The package manager will during upgrade process show which packages will be updated, and you can cancel the update installation at that time, if you for example notice that you need some app to be on certain version.

# Apt update package database
apt update

# (Optional step) Apt list which packages can be upgraded
apt list --upgradeable

# Apt upgrade and install the new updates
apt upgrade



# Homebrew update package database
brew update

# (Optional step) Homebrew: list which packages can be upgraded
brew outdated

# Homebrew upgrade and install the new updates
brew upgrade

 

You can also upgrade and install an update to a certain app (if for some reason you want to update only one application).

# In Apt upgrade certain package and install the new update
apt --only-upgrade install appname 

# In Homebrew upgrade certain package and install the new update
brew upgrade appname

Updating and upgrading apps (in Winget)

As Winget is still in Beta, it has been reported that it might not be so good idea to upgrade all apps at once through Winget. The problem might be related that Winget itself list all apps that have been installed in your Windows (not just the applications that have been installed through Winget). For this reason, you should use Winget to update only apps that you have installed through Winget and one by one. With the following command you can update a specific app:

winget upgrade appname

 

 

To updates all apps in Winget at once, you can run the following command, but as stated before, Winget is currently in Beta and using the following command isn’t recommended:

winget upgrade -all

 

 

Sources: