Filename extensions – Can’t open .exe files?

Every filename has a name and a three-character filename extension with the exception of the latest versions of Microsoft Office products that have four characters. This extension typically defines the type of file. For example, files ending in .doc are Word documents while files ending in .xls are Excel sheets. When you double-click a file that ends with an .exe extension, the system will attempt to execute the file. If you change the extension of an executable file, the file will still contain executable instructions; however, the system will not attempt to execute the file because it does not recognize the filename as an executable file type. To change the associate program of a file you right-click the filename from windows explorer and click the properties menu. The file properties window opens:

From the properties window click the Change button and from the Open with window, choose the program you want to use to open this file.

However, the Change button is not available for executable files! See the difference in the image below

That is enough for a quick intro to file extension associations. Now, what remedies are there if my system goes busted and I cannot open .exe files? This can easily happen if you mistakenly associate a program such as, Windows Media Player to .exe extensions! Believe me it can happen! There might be various options to solve this issue; however, I am going to explain two solutions:

By running the assoc command from the command prompt (command.com) or

Running a simple batch file as shown below

First, make sure that the administrator account is enabled and you know the password (or set a new password). You enable the administrator account from the Start menu, right-click Computer and click Manage. From the Computer Management Window, click Local Users and Groups and then Users, right-click the Administrator user and click Properties. Uncheck the Account is disabled check-box. Additionally, you can right-click the Administrator user again to set a new password.

The assoc command displays or modifies file extension associations and hence, is very useful in this situation.

Open a command prompt window by typing command.com in the Search text box from the Start menu

Click the command.com link. From the command.com window type

runas /user:yourmachinename\administrator command.com and you are prompted for the administrator password.

Enter the password and a new command.com window should open. From this window enter assoc .exe=exefile and you should be back to normal!
However, this may not work if the command.com link invokes the cmd.exe and you are back to square one!

So, the other method is to create a batch from another machine with the following text in it: assoc .exe=exefile and save it with the .bat extension, for example: fileassoc.bat

Move the file to your machine using a pen drive or other removable media and follow these steps:

Open a command prompt window by typing command.com in the Search text box from the Start menu

Click the command.com link. From the command.com window type

runas /user:yourmachinename\administrator e:fileassoc.bat and you are prompted for the administrator password, where e: is your removable media drive

You get your machine name by typing hostname at the command prompt

25 comments - What do you think?
Posted by
George -
May 16, 2010 at 6:35 pm

25 Responses to “Filename extensions – Can’t open .exe files?”

If it’s a uninstallable program like Adobe that is associated with .exe-files, you could uninstall the application that is associated. However when you reinstall the application the problem is back. But when you have uninstalled it, you could run system restore

Make sure that you are entering the correct password, otherwise From the Computer Management Window, click Local Users and Groups and then Users, right-click the Administrator user and click Set Password… to enter a new one.

So I have windows 7 but none of my files actually have .exe after their name. In properties, I can see they are .exe filetypes, but for example notepad for me just says notepad in the name under properties not notepad.exe. This is troubling for me because I want to send a file via gmail to my work email and gmail will not send executable files and this newer version of windows 7 won’t allow me to change the .exe extension the normal way in properties when you just change the name. Anyone have a solution to this? I tried using a file manager I downloaded to no avail.

Ok, now I realize I can’t run local users and groups and I’m freaked out because I can’t fix my computer. Suggestions? I can’t change the flippin password so I can’t do anything. I’m completely powerless in this situation. I don’t want to have to pay to get my computer fixed. Help?

Ok, now I realize I can’t run local users and groups and I’m freaked out because I can’t fix my computer. Suggestions? I can’t change the flippin password so I can’t do anything. I’m completely powerless in this situation. I don’t want to have to pay to get my computer fixed.