Cabinet file nessecary for installation cannot be trusted – Fixed!

The error “Cabinet file nessecary for installation cannot be trusted ” occurs under strange circumstances. It is displayed in Windows 7, 10, 11 only when trying to install DirectX or NET Framework. The surprising thing here is that both software belong to Microsoft, that is, by default they should receive a high trust rating from the system, if not even the maximum. Windows does not understand whether the system can trust the running file or not. Since this procedure is very dangerous, if a hacked, modified installer is installed, the OS blocks what it is not sure about.

Original message text:

DirectX installation error: A cabinet file necessary for installation cannot be trusted. Please verify the Cryptographic Services are enabled and the cabinet file is valid

Additionally, it can be said:

Failed to load module initpki.dll, gpkcsp.dll, sccbase.dll, slbcsp.dll.



Quite clearly, the reasons for the “cab file cannot be trusted” error are indicated in the text of the message. There are only a few of them:

  • the cryptography service is disabled, which is required to check file certificates;
  • the cryptographic service is broken;
  • installation is hindered by residual files from a previous version of DirectX or the .NET Framework, which are incorrectly layered on top of each other.

The main reason is that the cab file does not have a certificate or its presence cannot be verified due to disabled services. It follows from this if this is a file of your development, you need to contact the companies that issue certificates. After checking the code, all operating systems will have confidence in it.

How to fix the error?

We note right away that this error most often appears in Windows 7, but this operating system is not limited. It can also appear in Windows 10, 11, only much less often. In each case, the causes and remedies are similar. We recommend following strictly according to the instructions, since the first methods are the most effective and easiest to implement. At the end are those procedures that should work in more difficult situations.

1) Enable the Cryptography service

The cryptographic service is important for validating file certificates. However, it is rarely required, so some users disable the service without knowing about its features. Sometimes it is also turned off by programs, especially those designed to speed up system performance. Such savings are fraught with the inability to install important software and the penetration of viruses into the system, it is better to turn the function back on.

What to do when “Cabinet file nessecary for installation cannot be trusted ” when installing DirectX:

  1. Open Start and type in the search “Control Panel”, open the only option found.
  2. Click on “Administration” and select “Services”.
  3. If there is sorting by name, scroll through the list almost to the end and find “Cryptography Services”.
  4. We double-click on it, click on the “Run” button and in the line “Startup type” set the value to “Automatic”.

Cabinet file nessecary for installation cannot be trusted

It is worth trying to install, if the service was turned off, it should go without problems. At least for most users.

2) Clean up residual DirectX files before installing

We’ve seen a lot of mentions that cleaning up all the old files left over from previous versions of DirectX or the NET Framework helped some people. Given the relative simplicity and minimal risks of the procedure, it’s definitely worth a try.

How to fix “cab file not trusted” error:

  1. We go along the path \Windows\System32\directx\ or \Windows\SysWow64\directx, depending on the bitness of the Windows 7 operating system.
  2. Click on the “File” button, then “Organize” and click on the item “Folder and search options”.
  3. On the “View” page, activate the “Show hidden files and folders” flag and click on the “Apply” button.
  4. The websetup folder should appear, open it and delete all the contents.
  5. Re-run the online or offline installer.

Cabinet file nessecary for installation cannot be trusted

3) Restore Default Windows 7 Services

As we have already mentioned, there are exceptions to all rules and there are quite a few of them. Cryptographic services may not start or fail to run due to corruption, bad state, etc. However, there is a way to restore them to their default state. On Windows 7, it’s done like this:

  1. Download this software from the official Microsoft website.
  2. Unzip the PsTools program to any convenient place.
  3. Move PsExec.exe to the C:\Windows\System32 folder.
  4. We launch the command line with administrator rights.
  5. Enter the command psexec -i -d -s c:\windows\regedit.exe into the console. If this is your first run of the tool, you should select the Agree option.
  6. Now a relatively difficult step you need a servicedefaultregistryentries.reg file. It is difficult to find it on the Internet, and what is found cannot be trusted (there is no guarantee of safety). The best option, but longer, is to install the same operating system through VirtualBox and export the registry.
  7. Open the “Registry Editor”, to do this, press Win R, paste regedit and press Enter.
  8. In the “File” tab, select “Import” and specify the path to the servicedefaultregistryentries.
  9. Reboot your computer to make sure it works.

Cabinet file nessecary for installation cannot be trusted

4) Re-register the DLL files associated with the Cryptographic Service

If the cryptographic services did not start and even resetting to the default state did not help, the problem is most likely in its files. The method is especially relevant for those who see the message “Failed to load module initpki.dll, gpkcsp.dll, sccbase.dll, slbcsp.dll”. Now we will reinstall these and other important dll files.

Detailed instructions:

  1. Press the combination Win R, enter cmd. Hold down Ctrl Shift and press Enter to launch the console with administrator privileges.
  2. We sequentially enter the following commands, after each of them pressing the Enter key (now we unregister the listed files):
  • regsvr32 /u softpub.dll
  • regsvr32 /u wintrust.dll
  • regsvr32 /u initpki.dll
  • regsvr32 /u dssenh.dll
  • regsvr32 /u rsaenh.dll
  • regsvr32 /u gpkcsp.dll
  • regsvr32 /u sccbase.dll
  • regsvr32 /u slbcsp.dll
  • regsvr32 /u mssip32.dll
  • regsvr32 /u cryptdlg.dll
  • exit
  1. After the procedure is completed, restart the computer and open the command prompt again. Again we enter the following series of commands, this time we are already registering them:
  • regsvr32 softpub.dll
  • regsvr32 wintrust.dll
  • regsvr32 initpki.dll
  • regsvr32 dssenh.dll
  • regsvr32 rsaenh.dll
  • regsvr32 gpkcsp.dll
  • regsvr32 sccbase.dll
  • regsvr32 slbcsp.dll
  • regsvr32 mssip32.dll
  • regsvr32 cryptdlg.dll
  • exit

It’s time to try installing DirectX or .NET Framework again. We hope this time without the error “There is no trust in the cab file”. Provided that the dll-files listed above were not damaged, the installation will be successful. However, this may also be the case, in which case you will have to additionally use the sfc /scannow command. The system will check the health of the files and restore them if necessary.

Notify of
Inline Feedbacks
View all comments