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:

Before proceeding further, I recommend you SpyNoMore – The only Anti-Spyware you will ever need. Guaranteed! Scan your PC for Free now.

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:

  1. By running the assoc command from the command prompt ( or
  2. 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.

  1. Open a command prompt window by typing in the Search text box from the Start menu
  2. Click the link. From the window type
  3. runas /user:yourmachinename\administrator and you are prompted for the administrator password.
  4. Enter the password and a new window should open. From this window enter assoc .exe=exefile and you should be back to normal!
    However, this may not work if the 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:

  1. Open a command prompt window by typing in the Search text box from the Start menu
  2. Click the link. From the window type
  3. 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 :)