Architecting, installing and maintaining your SAS environment

Fixing .SAS file associations with SAS 9.4

Reply
New Contributor
Posts: 4

Fixing .SAS file associations with SAS 9.4

Posting this, in the hope that it helps someone else, and if it happens to me again in a year's time, I don't go on the same wild goose chase trying to fix it.Smiley Happy

 

In SAS 9.4, I lost the ability to launch a .SAS file in the editor window by double-clicking on it in Windows Explorer. Whilst there are lots of potential solutions online, most of them cater for issues on 9.2 or 9.3 which tell you to run the SAS File Type Management Tool, which no longer exists in 9.4.

 

For 9.4 you can now fix the issue using the Manage File Types Utility in the SAS Deployment Manager. However, this didn't work for me, as the Deployment Manager was just hanging when running. Apparently, this is due to the issue described in Problem Note 57391: The Manage SAS File Types utility in the SAS® Deployment Manager fails to associ.... The fix in the KB article didn't work for me either, as the reinstall BASE SAS option wasn't available in my setup.

 

By far the most useful information to help me find the solution was in Double-Clicking a SAS® File: What Happens Next? (although again, it is aimed at 9.2 / 9.3 rather than 9.4.)

 

What fixed it for me was the following. (This assumes that you have access to, and are comfortable with modifying your Windows registry):

  1. Deleted the UserChoice registry key as discussed in the Double-clicking paper.
  2. Running the SASFileTypeRegFix.reg registry fix as discussed in the paper.
  3. Using the windows registry editor. (Modify at your own risk, take a back-up before modifying):

    • Browse to HKEY_CLASSES_ROOT\SAS.Program.701\shell

    • Have a look and see if there is a populated value for the following key:
      HKEY_CLASSES_ROOT\SAS.Program.701\shell\OpenwithSAS940\command

    • If there is, copy the value from here, and paste it over the existing value in
      HKEY_CLASSES_ROOT\SAS.Program.701\shell\Open\command

    • For 9.4 the value that works for me is as follows:
      "C:\Program Files\SASHome\SASFoundation\9.4\core\sasexe\sasoact.exe" action=Open datatype=SASFile filename="%1" progid=SAS.Application.940 

    • Your situation may differ. You may have to create the keys/ subkeys from scratch. You may not have a OpenwithSAS940 key to copy from. But there should be enough in the above to get you on your way.

regedit_example.pngRegedit screen

Super User
Super User
Posts: 9,416

Re: Fixing .SAS file associations with SAS 9.4

Posted in reply to basinbasin

Maybe I am misunderstanding your point here, however SAS Base - i.e. a locally installed SAS to the machine should be easily able to open SAS files just by associating the file type with the application - much the same as you would do with any other application.  If it does not do this automatically, or you want to change it, right click on a .sas file, select Open With.  Then find the SAS application and make sure that set as default is checked.  Should work fine from there.  Really wouldn't go editing registry and such like for something so simple?

Ask a Question
Discussion stats
  • 1 reply
  • 90 views
  • 0 likes
  • 2 in conversation