How to Add or Remove ‘Install CAB’ Context Menu in Windows 10

How to Add or Remove Install CAB Context Menu in Windows 10 blog banner image

One way to simplify installing a .cab (or CAB) file is by adding “Install CAB file” in Windows 10 context menu. With this option activated, you will be able to start the installation of the CAB file without needing to enter a command or open another utility tool. To modify the context menu options, you would need to use Windows Registry Editor.

Individual users or IT operatives may choose to manually install a driver or feature update for various reasons. Manual installations grant admins better control over system or software compatibility, security, and maintenance. Meanwhile, an endpoint user may select this type of installation to adhere to security policies or navigate specific limitations.

How to add “Install CAB File” to the right-click context menu (step-by-step guide)

You can add “Install CAB file” to the context menu using the Registry Editor or a Registry Script.

Method 1: Using Registry Editor (regedit)

To make changes to the context menu, we need to manually edit the Windows Registry.

Step 1: Press Win + R, type regedit, and press Enter to open the Registry Editor.

Step 2: Navigate to Computer\HKEY_CLASSES_ROOT\CABFolder\Shell

Step 3: Right-click the Shell key, select New > Key, and name it Install.

Step 4: Inside the Install key:

    • Double-click (Default) in the right pane and set its value to Install CAB.
    • Right-click in the right pane, choose New > String Value and name it HasLUAShield. This step adds the UAC shield icon to indicate admin privileges.

Step 5: Right-click Install, select New > Key, and name it Command.

Step 6: Inside the Command key:

    • Double-click (Default) in the right pane and set its value to: cmd /k dism /online /add-package /packagepath=”%1″

Test a CAB file by right-clicking it to see if the context menu has been updated. If the changes do not take effect immediately, reboot the computer.

Method 2: Using a Registry Script (one-click solution)

To start, open Notepad and paste the following code:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\CABFolder\Shell\RunAs]

@=”Install”

“HasLUAShield”=””

[HKEY_CLASSES_ROOT\CABFolder\Shell\RunAs\Command]

@=”cmd /k dism /online /add-package /packagepath=\”%1\””

Save the file with a .reg extension (example: AddInstallCABContextMenu.reg). Double-click this file and follow the prompt to merge it with your Registry.

After confirming the changes, test a CAB file by right-clicking it to check if Install or Install this update has been added to the context menu.

How to remove “Install CAB File” from the context menu

Meanwhile, if you intend to remove the “Install” option in the context menu for CAB files, you have to delete the registry entry you added.

Step 1: Open Registry Editor.

Step 2: Navigate to: HKEY_CLASSES_ROOT\CABFolder\Shell

Step 3: Delete the Install key.

How to manually install a CAB file in Windows

Before you manually install a CAB file containing a Windows feature, driver, or update, consider creating a backup of your files and documents or an image backup of the system. This backup should help protect essential data in case the installation fails, a malware attack occurs, or a command-line error occurs.

You can also verify the integrity of CAB files in Windows by running the SignTool verify /pa /v FILENAME.cab command via Command Prompt or PowerShell prior to installation.

Once ready, follow these steps to manually install the CAB file from the context menu:

  1. Right-click on the CAB file you want to install. After adding “Install” to the context menu, you should see an option, “Install” or “Install this update.”
  2. Click Install, confirm the prompt, and Windows will automatically install the CAB file.

To install a CAB file using DISM, start by opening the Command Prompt with administrator privileges.

Then, navigate to the directory where the CAB file is stored, and use the dism /Online /Add-Package /PackagePath:”Path\to\CAB\file.cab” command.

Meanwhile, you can use the following command line for PowerShell: Add-WindowsPackage -PackagePath “Path\to\CAB\file.cab”.

Troubleshooting CAB file installation issues

Here are some common troubleshooting steps to address some installation issues:

  • Double-check file path inputs and make sure you have the necessary permissions to access the directory.
  • Right-click on the file, select Properties, and go to the Security tab to verify or modify permissions as needed.
  • Specify the exact location of the file using absolute paths. For example, use C:\Users\YourUsername\Documents\file.txt instead of .\Documents\file.txt.
  • Open the file or run commands as an administrator.
  • Confirm if Registry changes have been successfully saved.
  • Restart the computer after making changes to the Registry.
  • Check the system integrity using sfc /scannow if installation via DISM encounters an error.

Best practices for handling CAB files

While managing a CAB file grants you more control over the drivers and features installed on your device, manual installation can leave you vulnerable to unintended errors and risks. To protect your device and essential data from malware and compatibility issues, consider taking these extra precautions:

  • Create a backup of your files or an image backup of the system. We recommend reading this guide, How to Backup Files and Documents for Your Organization, for an in-depth discussion. 
  • Check the CAB file’s origin and integrity. As with any software installation, make sure the files are taken from an official source. Additionally, you can verify the digital signatures of CAB files using the SignTool command.
  • Use official Microsoft CAB files when updating Windows systems and features.
  • Using the Device Manager to install CAB files for hardware devices to ensure software compatibility.
  • DISM and PowerShell are ideal for batch updates and remote or automated deployment. These tools also provide more detailed error reporting and other options for advanced users.

Frequently Asked Questions (FAQs)

1. What is a CAB file, and why do I need to install it manually?

Automatic system and feature updates in Windows can occasionally fail, leaving you with no other option but to manually install the updates, which are normally compressed as CAB files.

Manual installation is also useful when installing a specific or stable device driver. Additionally, some secure business environments may prefer an offline installation for major software updates.

2. Can I install multiple CAB files at once?

You can install multiple CAB files using the DISM. An example command is dism /Online /Add-Package /PackagePath:”Path\to\CAB\file1.cab” /PackagePath:”Path\to\CAB\file2.cab”. Make each file path is enclosed in quotes and separated by a space for the command to run as intended.

3. How do I check if a CAB installation was successful?

There are three quick ways to confirm if the CAB installation was successful.

Option 1: Verify using Windows update history:

  • Go to Settings > Update & Security > Windows Update.
  • Click on View update history to see if the CAB file installation has been completed.

Option 2: Check the installation status using PowerShell:

  • Open PowerShell as an administrator.
  • Run the Get-WindowsPackage -Online command to show the list of all installed updates.
  • Verify if the CAB file you installed is on the list.

Option 3: Check installed updates using Command Prompt:

  • Open Command Prompt as an administrator.
  • Run dism /online /get-packages command to display the list of all installed updates.
  • Look for the package name of the CAB file you installed in the list.

4. Does removing the context menu option delete CAB files from my system?

Removing the context menu will not delete CAB files from your computer. The context menu only functions as a shortcut for managing CAB files. The files will remain in the directory unless they are manually deleted.

5. How do I restore the default CAB installation behavior in Windows?

You can restore the default CAB installation behavior using Settings or Registry Editor.

Using Settings:

  • Open Settings or Press Win + I
  • Go to Apps > Default apps.
  • Scroll down and select Choose default apps by file type.
  • Find the .cab file extension and set it to the recommended default application.

Using Registry Editor:

  • Press Win + R, type regedit, and press Enter.
  • Navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.cab\UserChoice.
  • Delete the UserChoice key to reset the association for CAB files.

This should restore the file association to the system’s recommended default, which for CAB files is usually Windows File Explorer.

Knowing how to install CAB files in Windows 10

Understanding a CAB file and when to use it for manual installations of Windows features, updates, and drivers can be helpful for individual users and IT administrators.

However, IT admins may also choose to add or remove the “Install CAB” option from the context menu for various reasons. For example, they may enable it to simplify the process for end users and prevent Command Prompt or Registry errors from being triggered.

Next Steps

Building an efficient and effective IT team requires a centralized solution that acts as your core service deliver tool. NinjaOne enables IT teams to monitor, manage, secure, and support all their devices, wherever they are, without the need for complex on-premises infrastructure.

Learn more about Ninja Endpoint Management, check out a live tour, or start your free trial of the NinjaOne platform.

You might also like

Ready to simplify the hardest parts of IT?
×

See NinjaOne in action!

By submitting this form, I accept NinjaOne's privacy policy.

NinjaOne Terms & Conditions

By clicking the “I Accept” button below, you indicate your acceptance of the following legal terms as well as our Terms of Use:

  • Ownership Rights: NinjaOne owns and will continue to own all right, title, and interest in and to the script (including the copyright). NinjaOne is giving you a limited license to use the script in accordance with these legal terms.
  • Use Limitation: You may only use the script for your legitimate personal or internal business purposes, and you may not share the script with another party.
  • Republication Prohibition: Under no circumstances are you permitted to re-publish the script in any script library belonging to or under the control of any other software provider.
  • Warranty Disclaimer: The script is provided “as is” and “as available”, without warranty of any kind. NinjaOne makes no promise or guarantee that the script will be free from defects or that it will meet your specific needs or expectations.
  • Assumption of Risk: Your use of the script is at your own risk. You acknowledge that there are certain inherent risks in using the script, and you understand and assume each of those risks.
  • Waiver and Release: You will not hold NinjaOne responsible for any adverse or unintended consequences resulting from your use of the script, and you waive any legal or equitable rights or remedies you may have against NinjaOne relating to your use of the script.
  • EULA: If you are a NinjaOne customer, your use of the script is subject to the End User License Agreement applicable to you (EULA).