Blog

After a virus infection or incorrect registry modification in Windows, a user may encounter a problem: executable .exe files, installation msi files, or script files powershell/cmd/vbs stop running. When trying to open a file from File Explorer, nothing happens, a window appears prompting you to choose a program, or .exe files open in a single program (for example, notepad.exe or paint.exe). In this article, we will look at how to restore the ability to run .exe files in Windows.

You can always buy genuine product keys for Windows in our catalog from 8 €

Restoring EXE File Associations in Windows

If when launching any .exe file in Windows, a window appears with the question “How do you want to open this file?”

Or you simply cannot open the .exe file.

Or you get the error “Windows cannot access the specified device, path, or file.”, which is most often related to a virus or registry changes.

To restore associations for executable .exe files, do the following:

1. Create a text file on the desktop.

2. Copy the following line into the file:

start cmd

3. Rename the file to run.bat and run it as administrator.

4. In the opened cmd window, execute these commands:

reg delete HKEY_CLASSES_ROOT\.exe /ve /f
reg add HKEY_CLASSES_ROOT\.exe /ve /d exefile /f
reg delete HKEY_CLASSES_ROOT\exefile /ve /f
reg add HKEY_CLASSES_ROOT\exefile /ve /d Application /f
reg delete HKEY_CLASSES_ROOT\exefile\shell\open\command /ve /f
reg add HKEY_CLASSES_ROOT\exefile\shell\open\command /f /ve /d "\"%1\" %*"
assoc .exe=exefile

These commands reset the .exe file associations to their defaults. Restart your computer.

If .bat and .cmd files also do not run, you will need to edit the registry manually in Safe Mode:

1. Boot the computer into Safe Mode via WinRE (interrupting the Windows startup three times in a row).

2. While in the Windows Recovery Environment (WinRE), select Troubleshoot > Advanced options > Startup Settings > Restart, and after restarting, choose option 4 by pressing F4.

3. In the regedit.exe registry editor, open the key HKEY_CLASSES_ROOT\.exe and change the Default value to exefile.

4. Then go to HKEY_CLASSES_ROOT\exefile\shell\open\command and set the Default value to “%1” %*.

5. Repeat a similar procedure for HKCR\exefile\shell\open and HKCR\exefile.

After that, restart your computer in normal mode, and File Explorer should use the default associations for .exe files. Also execute the following command:

assoc .exe=exefile

Additionally, check system file integrity:

sfc /scannow
DISM /Online /Cleanup-Image /RestoreHealth

Make sure that your antivirus is not blocking the execution of .exe files.

Executable .exe Files Won’t Run from a Network Folder

If .exe files run locally but do not open from a network folder, possible causes include:

1. Check NTFS permissions on the folder/file. If Read/Execute permissions are missing, you’ll see an error such as:
Access is denied to \\sharepath\file.exe. Contact your network administrator to request access.

2. Change the NTFS permissions.

3. Run the file in compatibility mode: in the .exe file properties, select Compatibility and set compatibility mode with Windows 8.

4. If the network folder is located on a device that only supports SMB v1 (for example, NAS or Windows Server 2003), you may see errors like:

5. Make sure SMBv2 or SMBv3 is enabled:

Get-SmbServerConfiguration | Select EnableSMB2Protocol

6. To enable SMBv2 on the file server:

Set-SmbServerConfiguration -EnableSMB2Protocol $true

For Linux servers with Samba, disable SMB1 in the smb.conf configuration by adding:

min protocol = SMB2

If your file server is running an outdated SMBv1, you must enable the “SMB 1.0/CIFS Client” on users’ computers to access such storage from modern versions of Windows 10 — (which is strongly not recommended).

It is better to move your data to Windows Server 2012 R2 or later to ensure compatibility with SMBv2 or SMBv3.

banner for Windows
Buy Windows от product key from
Subscribe
Notify of
guest
0 comments
Inline Feedbacks
View all comments