>> 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\
         UPDATES:  C:\Stata7\ado\updates\
            BASE:  C:\Stata7\ado\base\
            SITE:  C:\Stata7\ado\site\
         STBPLUS:  c:\ado\stbplus\
        PERSONAL:  c:\ado\personal\
        OLDPLACE:  c:\ado\

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

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

Windows ME, 2000, XP

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

Windows ME, 2000, XP

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





The Stata Blog: Not Elsewhere Classified Find us on Facebook Follow us on Twitter LinkedIn Google+ YouTube
© Copyright 1996–2016 StataCorp LP   •   Terms of use   •   Privacy   •   Contact us