Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Not able to -Execute- from right click on do file: Windows 10 & Stata 16

    Using Stata 14, setting file associations (Edit > Preferences >Set File Association) would provide an Execute option when the do file was right clicked in Explorer.

    Either after upgrading to version 16 or Windows 10 (which we did recently), this option was lost.

    While I can set the file association of do files to Stata manually, if I use the Set File Association option in Stata nothing happens or, if file associations are already set to Stata, has the unexpected result of resetting the extension association to my text editor of choice, Notepad++.

    Is there something I'm missing? I can't recall if this functionality was lost with the Stata update or when we transitioned to Windows 10.

    Thanks for any help.

    -cam

  • #2
    I'm looking for a solution as well to be able to execute do files in Notepad++ with Stata 16. And I can verify that it's Stata 16 that's causing the problem (at least in conjunction with Windows 10) since I had Windows 10 for a couple of years and was able to use Notepad++ to run my do files in Stata 14 and 15. It's when I updated to 16 that the functionality was lost, which has made working in Stata much more difficult.

    Comment


    • #3
      Hi Adam. I'm able to run do files from Notepad++ with Stata 16 and Windows 10 with no problem. I think the executable location changed for ver 16, so it may just be a matter of revising your ini files.

      From 14 to 16, anyway, the path changed

      Code:
      [Stata]
      ; Path to Stata executable
      ; Edit to match user's setup. Examples for Stata/SE 12, 11, 10, 9 and 8 listed below.
      ; statapath = "C:\Program Files (x86)\Stata14\StataSE-64.exe"
      statapath = "C:\Program Files\Stata16\StataSE-64.exe"
      Last edited by cammcdermaid; 29 Jun 2020, 10:43.

      Comment


      • #4
        Thanks for responding to my post! I was able to get it working again on Stata 16. The path in the ini file was correct, but I changed the shortcut to execute the run command in Notepad++ (I had been using Ctrl+R and changed it to Alt+Space), and now it works. I'm not sure why that did the trick. I know the author of the program suggested avoiding using Ctrl as part of the shortcut because it can results in a stuck Ctrl key in Stata, but I didn't see signs that that was happening. Oh well. I'm glad to have it back. My Stata crashed earlier today and if I had my do-file opened in Notepad++, I wouldn't have lost the changes I had made to the do file just before running the code. That motivated me to spend some time trying to figure out why it wouldn't work. Anyway, I feel whole again after several months of having to use the do file editor in Stata. Thanks again.

        Comment

        Working...
        X