Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Windows 10 / Fix: Cannot Open Executable (.EXE) Files on Windows

October 20, 2022 Windows 10Windows 11

Fix: Cannot Open Executable (.EXE) Files on Windows

After being infected with a virus or incorrectly changing the system registry, the user may encounter the fact that executable EXE-files (installation MSI-files or PowerShell/CMD/VBScript files) not opening in Windows. When you run any program (shortcut) from File Explorer, nothing happens, a window appears asking you to select a program or all EXE files are opened in a different program (for example, in notepad.exe or in paint.exe). In this article, we will look at how to fix the problem when you cannot run any executable file or application on Windows.


Contents:
  • How to Fix Broken EXE File Associations on Windows?
  • Windows Cannot Run EXE Files from a Network Share

How to Fix Broken EXE File Associations on Windows?

When you run any application *.exe file in Windows, a window appears asking you to select a program (How do you want to open this file?):

unable to run executable exe files on windows 10

Or errors appear:

This file does not have an app associated with it for performing this action. Please install an app, if one is already installed, create an association in the Defaults Apps Settings page.
Windows cannot access the specified device, path, or file. You may have the appropriate permissions to access the item.
Windows can't open this file.

error: exe file doesnt have file associated with

Most often, this problem appears after a virus infection or an unsuccessful attempt to “optimize” the Windows registry. The source of this problem is that the file associations for *.exe files were reset in the Windows registry. To restore associations for executable files on Windows, you need to use the Registry Editor (regedit.exe), but it also won’t open because it is also an executable file. Neither cmd.exe nor PowerShell opens. What to do in this case?

  1. Create a simple text file on your desktop;
  2. Paste the following line to the file: start cmd
  3. Rename the file to run.bat;
  4. Right-click on the file and select Run as administrator;run an elevated cmd via bat file
  5. Confirm the elevation of privileges in UAC and an elevated command prompt window will open;
  6. You can run regedit.exe and make changes to the registry manually (the method is described below) or paste the following code into the command prompt window:
    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

    command to fix an error: cannot open exe file on windows 11 or 10
  7. These commands will reset the EXE file associations to the default ones;
  8. Restart your computer and try to run any app.

If even the *.bat and *.cmd files won’t start on your computer, you will have to edit the registry manually in Safe Mode.

  1. Boot the computer into the Safe Mode (just interrupt Windows boot by pressing the power button three times in a row);
  2. The computer will boot into the Windows Recovery Environment (WinRE). Select Troubleshoot -> Advanced options -> Startup Settings -> Restart. Press F4 to boot Windows in Safe Mode;
  3. Run the Registry Editor (regedit.exe) and go to the reg key HKEY_CLASSES_ROOT\.exe;
  4. Change the Default registry parameter value to exefile;fixing exe file assotiation via registry
  5. Then go to the HKEY_CLASSES_ROOT\exefile\shell\open\command and change the value of the Default parameter to "%1" %* restore file assotiation for exe files
  6. Then, by analogy, change the values of the Default parameter to "%1" %* in the  HKCR\exefile\shell\open and HKCR\exefile registry keys;
  7. Restart your computer normally. File Explorer should now use the default EXE file associations. Try to run any *.exe file.

Additionally, you should check these steps to restore *.exe file associations:

  • Execute the command to reset the EXE file associations: assoc .exe=exefile
  • Check that the UserChoice key is missing in the registry key HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.exe. If there is such a key, delete it;
  • Check the integrity of the Windows image and system files using the commands:
    sfc /scannow
    DISM /Online /Cleanup-Image /RestoreHealth
  • Make sure that your anti-virus program doesn’t block the launch of executable files;
  • If Windows displays a security warning when opening executable files, follow the instructions in this article.

Windows Cannot Run EXE Files from a Network Share

If users can run EXE files locally on their computers, but an error appears when launching files from network shared folders, then the cause of the problem may be different.

  1. Check the current NTFS permissions for the shared folder or file. If the user is not assigned NTFS Read/Execute permission, then an error will appear when running the executable file:
    Windows cannot access \\server1\sharedfolder\file.exe. You do not have permission to access applicatin.exe file.

    windows cannot open exe file from network shared folder

    Change NTFS permissions manually or through PowerShell.
    grant NTFS execute permission for exe files

  2. Try running the executable file in compatibility mode. To do this, open the properties of the EXE file, go to the Compatibility tab, select the compatibility mode with Windows 8. Try to run the application from a network share.

windows 10 1803 run executables from network folder in compatibility mode for Windows 8

The problem may be related to the fact that you are trying to connect to a shared folder located on a device that only supports the SMB v1 protocol (this could be a NAS storage device, a file server with a legacy OS version, such as Windows XP or Windows Server 2003).

Errors may indicate this:

The application was unable to start correctly (0xc00000ba)
Exception thrown at 0x00007FFA2B86624E
0xC0000005: Access violation reading location 0x0000000000000000)
Note. When a client and server interact over the SMB protocol, the maximum protocol version is selected for communication, which is simultaneously supported by the client and the server (see the article SMB versions in Windows). You can determine the SMB version your client is using to connect to the file server using the Get-SmbConnection PowerShell cmdlet.

Get-SmbConnection check used SMB version

Check if SMBv2 or SMBv3 is enabled on your file server using the PowerShell command:

Get-SmbServerConfiguration | Select EnableSMB2Protocol

If SMBv2 is disabled, you can enable it:

Set-SmbServerConfiguration -EnableSMB2Protocol $true

Also, if you are using Linux Samba as a file server, you can disable SMB1 in the configuration file smb.conf. Add the line min protocol = SMB2 to the [global] section and restart Samba.

By default, you cannot access shared folders hosted on a file server running Windows Server 2003 or on a NAS device that only supports SMB1. To access such an SMB share from modern Windows 10 builds, you need to enable the SMB 1.0/CIFS Client on users’ computers (which is not recommended for security reasons).

enable SMB 1.0/CIFS Client windows 10 1803

The correct solution, in this case, is to migrate the shares with executable files to Windows Server 2012 R2/2016/2019, where the SMB1 protocol is disabled. In this case, you will be able to run executable files located in shared folders from your Windows 10 device.

21 comments
4
Facebook Twitter Google + Pinterest
previous post
Display System Information on Windows Desktop with BgInfo
next post
Configuring UserPrincipalName and UPN Suffixes in Active Directory

Related Reading

Zabbix: How to Get Data from PowerShell Scripts

October 27, 2023

Tracking Printer Usage with Windows Event Viewer Logs

October 19, 2023

How to Use Ansible to Manage Windows Machines

September 25, 2023

Installing Language Pack in Windows 10/11 with PowerShell

September 15, 2023

How to View and Change BIOS (UEFI) Settings...

September 13, 2023

21 comments

MKGeek May 16, 2018 - 7:21 am

Thanks for the info! But the problem with running applications from network folders is actually related to updating the engine of the built-in antivirus Windows Defender in Windows 10 1803. If you disable Windows Defender and install an alternative antivirus, the problem with executing executable files from the shared folders disappears. So, if you have a file server with Windows Server 2003 / Windows XP / or an outdated NAS device left on the network, disabling Windows Defender can help you.

Reply
Alan Gresham May 17, 2018 - 9:18 am

My experience is not consistent with the problem being Windows Defender MKGEEK. I get different results when the network location is my NAS (problem evident), compared to a file share on my Windows File servers (problem not evident). And disabling Defender didn’t help at all.

So for me, the problem seems very much consistent with the article.

Reply
Bartosz May 17, 2018 - 5:08 pm

I also had the same problem with running exe files from the NAS. But at me instead of Windows Defender in my Windows 10 1803 the antivirus Symantec is installed.
The problem was solved by removing Symantec and installing instead a free AVG

Reply
Diego May 31, 2018 - 6:37 pm

The problem is not with Windows Defender. I have Nod32 Smart AV with Firewall enabled(so Windows defender DISABLED) and the problem persist. It´s like ALAN GRESHAM said.

Diego.

Reply
Steve Glascoe May 17, 2018 - 5:13 pm

It’s a problem with Defender and other Antivirus programs. I uninstalled our Symantec Endpoint Protection Small Business Edition, then enabled the Windows Firewall and install Avast antivirus and the program would load as before. So, I think it’s a Microsoft problem along with SOME of the other Antivirus programs.

Reply
tech May 18, 2018 - 7:40 am

So the question is what Avast and AVG modified in the registry to make it work again?

Reply
wolfkin May 23, 2018 - 4:18 pm

As an additional bit of information on this. I have this issue – but, only on my stations joined in a WorkGroup. The ones using a Domain login can launch and run apps without Databese connection errors.

With the Workgroup apps, I use a specific Username/Pwd to connect to the database. I can open a UDL file and connect successfully to the database. Running the App on the local station works as advertised.

I will be attempting the Avast solution.

Reply
Windows 10 1803 can’t run EXE files from a network shared folders | Chilkat Tech Notes May 23, 2018 - 10:17 pm

[…] The answer is found here. […]

Reply
CompTech May 30, 2018 - 8:42 am

Any new news from MS about a better fix for this rather than a bad workaround?

Reply
Alan Gresham May 30, 2018 - 10:29 am

They broadcast for years that SMBv1 support was going to be dropped – if your network storage doesn’t support (or the case of a NAS device have a firmware upgrade that will support) SMBv2 or SMBv3 then that device has reached the end of it’s useful life for use within a Windows environment. They aren’t going to reverse this…

Reply
COMPTECH May 31, 2018 - 2:25 am

Yes we already know regarding that SMBv1 support since it was announced! The question is why it will work when you install like AVG and Avast?

Reply
Alan Gresham May 31, 2018 - 3:03 am

Because they aren’t doing as good a job of protecting you against the risks of letting executables hosted on an SMBv1 disk do whatever they like. Or am I missing something?

Reply
COMPTECH June 1, 2018 - 1:14 pm

There must be something change in windows registry or what ever settings, because in windows 1709 it still works, It seems windows 10 1803 is blocking programs that opening a network socket. But anyway as what I saw on MS forum it seems MS is already inform about it and most of the people there are waiting for the subsequent update from MS.

Alan Gresham June 4, 2018 - 1:06 am

This blog entry from an MSFT is why I don’t think that it’s an accident that we are seeing this behaviour, and why I don’t expect to see a fix from Microsoft.

https://blogs.technet.microsoft.com/filecab/2016/09/16/stop-using-smb1/

Reply
COMPTECH June 14, 2018 - 7:01 am

A user on MS forum has discovered how AVG fixes the issue. Apparently it’s related to a File System Filter Driver which is part of AVG antivirus applications and when i search about that file the description is “AVG Virtualization Driver”.
But even more encouraging is that Microsoft has now acknowledged that a fix is currently in the works.
https://support.microsoft.com/en-nz/help/4284835/windows-10-update-kb4284835

Reply
Alan Gresham June 14, 2018 - 7:19 am

Many thanks for the info, great work!

Reply
a1 June 27, 2018 - 9:57 am

This appears to be fixed in KB4284848 released today.
Addresses an issue where some users may receive an error when accessing files or running programs from a shared folder using the SMBv1 protocol. The error is “An invalid argument was supplied”.

Reply
COMPTECH July 5, 2018 - 7:03 am

Yes, this KB4284848 is the real deal… Case Solve….:-)

Reply
KPG July 5, 2018 - 4:47 pm

Confirmed KB4284848 on win 10 home 1803 allows exe’s to access internet resources when run from a mapped drive using SMB 1.5.

Reply
Võ Mạnh Hùng võ July 1, 2020 - 2:44 pm

It work. I change regedit “EnableLUA” key to “0” in \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System . My system is windows 10 ver 1709.

Reply
Aidan Obrien December 25, 2021 - 3:38 am

i cannot “run as admin” in the advice above to fix the problem please help…

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Zabbix: How to Get Data from PowerShell Scripts

    October 27, 2023
  • Tracking Printer Usage with Windows Event Viewer Logs

    October 19, 2023
  • PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

    October 15, 2023
  • Reset Root Password in VMware ESXi

    October 12, 2023
  • How to Query and Change Teams User Presence Status with PowerShell

    October 8, 2023
  • How to Increase Size of Disk Partition in Ubuntu

    October 5, 2023
  • How to Use Ansible to Manage Windows Machines

    September 25, 2023
  • Installing Language Pack in Windows 10/11 with PowerShell

    September 15, 2023
  • Configure Email Forwarding for Mailbox on Exchange Server/Microsoft 365

    September 14, 2023
  • How to View and Change BIOS (UEFI) Settings with PowerShell

    September 13, 2023

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Repair EFI/GPT Bootloader on Windows 10 or 11
  • How to Restore Deleted EFI System Partition in Windows
  • Network Computers are not Showing Up in Windows 10/11
  • Updating List of Trusted Root Certificates in Windows
  • How to Create a Wi-Fi Hotspot on your Windows PC
  • How to Sign an Unsigned Device Driver in Windows
  • How to Download APPX File from Microsoft Store for Offline Installation?
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top