>> Home >> Resources & support >> FAQs >> Stata 7: The wstata.exe file is not renamed properly

### Stata 7: Why will the new executable not work after I updated Stata? Why is the old executable (wstata.old) still running after I updated the executable?

 Title Stata 7: The wstata.exe file is not renamed properly Author Kevin Crow, StataCorp Date May 2002

There are two frequently asked questions associated with updating your Stata executable on a Windows computer.

First, when users update the Stata for Windows executable, they are instructed to rename their current wstata.exe to wstata.old and to rename the just downloaded wstata.bin to wstata.exe. Sometimes Windows will try to be “smart” and will hide the file extension for some files in the Stata directory. When you try and rename the file wstata.bin to wstata.exe Windows actually attaches an extension of .bin to the file so you are left with wstata.exe.bin.

Second, after renaming the Stata executable files, Windows will sometimes move the .dta filename association to point to wstata.old when this renaming takes place. This results in the old wstata.old executable being launched when users double-click on a .dta dataset to launch Stata.

A solution for both problems is to change the name of the executable and bin file from a DOS prompt. First, you will need to know which directory Stata is installed in. To find this directory, type sysdir in your Stata command line, and note the path in the entry labeled STATA: "path".

        . sysdir
STATA:  C:\Stata7\


Next change to a DOS prompt and rename the files. To get to a DOS prompt, follow the instructions below:

1. In your Stata command line, type !cmd (type !command for Windows 95, 98, and ME).
2. When the DOS prompt appears, change to the Stata directory using the cd command.
3. Once in the Stata directory, type rename wstata.exe wstata.old and hit Enter.
4. Next, type rename wstata.bin wstata.exe and hit Enter.
5. Type exit.

For example:

        C:\Documents and Settings\khc>cd C:\Stata7
C:\Stata7>rename wstata.exe wstata.old
C:\Stata7>rename wstata.bin wstata.exe
C:\Stata7>exit


An alternate solution to problem one is to change your folder options to show all file extensions. For help changing your folder options, follow the instructions below:

### Windows 95, 98, NT

• Open My Computer or Windows Explorer.
• Go to the View menu and choose Options (Folder Options in Windows 98).
• In the window that appears, choose the View tab.
• Find the check box that states “Hide file extensions for known file types“.
• Make sure that this box is unchecked.

### Windows ME, 2000, XP

• Open My Computer or Windows Explorer.
• Go to the Tools menu and choose Folder Options....
• In the window that appears, choose the View tab.
• Find the check box that states "Hide file extensions for known file types".
• Make sure that this box is unchecked.

After you have followed the steps above, try following the original steps as listed below:

1. Exit Stata.
2. Open My Computer or Windows Explorer and find the Stata directory.
3. Right-click the wstata.exe file and drag down to Rename. Rename wstata.exe to wstata.old.
4. Right-click the wstata.bin file and drag down to Rename. Rename wstata.bin to wstata.exe.
5. Try Stata.
6. Later, delete wstata.old if you are satisfied with how Stata is working or copy wstata.old back to wstata.exe if Stata is not working properly.

An alternate solution to problem two is to change the file association for .dta files. For help changing the file association for .dta files follow the instructions below.

### Windows 95, 98, NT

• Open My Computer or Windows Explorer.
• Go to the View menu and choose Options (Folder Options in Windows 98).
• Click File Types tab. Scroll through the list until you find Stata Dataset. Click it, and then click the Edit button.
• You will see an Edit → File → Type dialog. In the Actions section, click open and then click the Edit button.
• Type C:\Stata\wstata.exe /m1 use "%1" in the Application used to perform action box.

### Windows ME, 2000, XP

• Open My Computer or Windows Explorer.
• Go to the Tools menu and choose Folder Options....
• Click the File Types tab. Scroll through the list until you find Stata Dataset. Click it, and then click the Advanced button.
• You will see an Edit → File → Type dialog. In the Actions section, click open and then click the Edit button.
• Type C:\Stata\wstata.exe /m1 use "%1" in the Application used to perform action box.

Note: If you have Stata/SE the name of the executable is wsestata.exe and the name of the downloaded file is wsestata.bin.