| Title | Stata 7: The wstata.exe file is not renamed properly | |
| Author | Kevin Crow, StataCorp |
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:
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:
After you have followed the steps above, try following the original steps as listed below:
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.
Note: If you have Stata/SE the name of the executable is wsestata.exe and the name of the downloaded file is wsestata.bin.