BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
rgoetze
Calcite | Level 5

The people I'm supporting are typically running SAS 9.2 under Windows 7, both 64 and 32 bit

Prior to SAS being bundled with Enterprise Guide, a user could double click on a .sas file the file would open and not execute in SAS. Now that installations come with Enterprise Guide when a user double clicks on a .sas file the file opens in EG. I have been asked how one can open the file in SAS (not EG) with a double click.

Personally I right click on the .sas file and choose 'open with SAS 9.2' from the context menu. My users, being older academics, reject my simple solution. I have tried re-associating the .sas type file to sas.exe instead of EG and also uninstalling EG. Both of these resulted in a double click executing the .sas file and not just opening it.

This sounds like a Windows thing and I think it is, but I think it's a registry issue. If anyone has any good ideas I would appreciate the help.

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
michele_sas
SAS Employee

File type associations on Windows 7 can be tricky. Two common issues are:  1. Double click a .sas file and it batch submits. 2. Double click a .sas file and it opens in SAS Enterprise Guide when the user expects it to open in the SAS display manager.   See below for some suggestions.

1. Double click a .sas file and it batch submits:

Check to see if you have a UserChoice key set in your Windows registry. If this is set then you can certainly have problems.  This gets set when you use the Windows operating system methods to associate a file type with an application. For example choosing to associate the .sas file type with sas.exe will result in batch submiting a .sas file when you double click it.

Click start and in the search box type regedit and enter.

Navigate to:

HKEY_current_user ► Software ► Microsoft ► Windows ► Current Version ► Explorer ► Fileexts ►  .sas

Look for a key named UserChoice.

If UserChoice exists right click the key and choose export. This will save the key should you need to add it back to your Windows registry.

After you export and save the UserChoice key delete it from your Windows registry by right clicking and choosing to delete.

Warning: Always backup your Windows registry before making changes.

Next test by double clicking a .sas file.  If it still batch submits or opens in SAS Enterprise Guide you should run the Manage SAS File Types utility. The utility allows you to associate file types with either SAS or SAS Entperprise Guide.

SAS 9.2: Go to Start -> Programs -> SAS -> SAS 9.2 License Renewal and Utilities -> Manage SAS File Types

SAS 9.3: Go to Start -> Programs -> SAS -> Utilities -> Manage SAS File Types

For Windows Vista, Windows 7 or Windows Server 2008 it is important that you  "right click" the utility and "run as administrator" even if you are the administrator.

Next re-test by double clicking a .sas file.

2. Double click a .sas file and it opens in SAS Enterprise Guide:

File types can only be associated with one application at a time. While some users might want a .sas file to open in SAS Enterprise Guide, some users might want .sas files to open in the SAS display manager. To associate your file types with either SAS Foundation or SAS Entperprise Guide use the Manage SAS File Types utility.

SAS 9.2: Go to Start -> Programs -> SAS -> SAS 9.2 License Renewal and Utilities -> Manage SAS File Types

SAS 9.3: Go to Start -> Programs -> SAS -> Utilities -> Manage SAS File Types

Remember to right click on the utility and run as administrator.

I hope this helps.

View solution in original post

35 REPLIES 35
Tom
Super User Tom
Super User

It is a Windows thing.  From Windows Explorer select Tools -> Folder Options. Then select File Types tab.  Look for the the .sas files in the registered file types list and highlight it.  Hit the ADVANCED button.   You should now see all of the actions associated with the file.

You can try just changing which one is marked as the default, but I have in the past found that some windows actions insist on calling the one that is named "open".  You can just rename them or re-create them with different names.

How this works on different versions of Windows I am not sure.  We are still running XP.

rgoetze
Calcite | Level 5

Yeah, wasn't it great the way you used to be able to do that. Unfortunately Win 7 isn't that easy. I've looked around for these options in Win 7, but I haven't found them yet.

Sunshine_sas
SAS Employee

Hi there,

I was curious if you have tried or knew about the Manage SAS File Types utility? If you click on Start>Programs>SAS>SAS 9.2 License and Renewal Utilities> Manage SAS File Types - you can select either

SAS Foundation 9.2 or SAS Enterprise Guide from the menu, then select All and click OK.

Best Regards!

rgoetze
Calcite | Level 5

Sunshine,

That looks like a nice utility that could do the trick, i.e. uncheck .sas in EG and check in SAS. It has to be run as an administrator under Win 7 to not throw an exception, but checking and unchecking do nothing. Re-entering the utility shows all checks in place and no change.

Bob

Sunshine_sas
SAS Employee

Hi Bob, Your correct, you need to have admin priviledges to run this - in some cases you might only have to right click and select Run as administrator for Windows 7.

When you make the changes in the tool and then exit, they should work in Windows Explorer. However, going back into the tool, it does look like nothing has happened. So the key is to make your changes and then click Ok in the utility and close it. then got to Windows Explorer and test it there.

Take care!

rgoetze
Calcite | Level 5

Sunshine,

Sorry I forgot to mention that. I did think that something might have happened even though it didn't look like it.I tried going right to the file and double click it - opened up in EG. Then I logged off and logged back on and tried again. Same results - opened in EG.

I did see that one of the times I tried it as not administrator, the pop-up exception complained about writing to HKEY_CLASSES_ROOT/.egp. I looked in the registry at that location and it does reference 'SASEguide.Project.2' for that file type and /.sas references 'SAS.Program.701' for that file type. That's apparently where changes are attempting to be made.

The bottom line is I don't want to necessarily change the file/application association, I just don't want the SAS script to run when SAS is the application. I want SAS to open the script in an edit window like it did before EG.

Thanks.

Bob

Tom
Super User Tom
Super User

Here is the Microsoft page on associating actions (or verbs).

http://msdn.microsoft.com/en-us/library/cc144175%28v=vs.85%29.aspx

It really seems that Microsoft has made this much more difficult to manage.

BrianH_
Calcite | Level 5

My organization (including myself) is having the same issue, and we are seeking the same result: to be able to double-click on a SAS program (in Windows 7) and have it open the program in SAS 9.2 editor (like it has in the other versions of Windows), as opposed to the SAS job running without opening, like a batch job.

We know how to make this change in Windows XP, but the options have changed in 7.

Any ideas, in additon to what has been posted above?

Thanks,

Brian

Sunshine_sas
SAS Employee

Hi Brian,

The first thing you can try is to use the Manage File Type Utility.

To do this click Start>Programs>SAS>SAS 9.2 License and Renewal Utilities>Manage File types

When it opens highlight SAS Foundation 9.2 - click Select All and OK.

Now go into Windows Explorer and try this again.

http://support.sas.com/kb/32/464.html

You might need to reference this in rare cases, especially is the UserChoice has been set.

Always backup registry before making these kinds of changes though.

Have an awesome day!

BrianH_
Calcite | Level 5

Sunshine,

I followed your steps (running the Manage File types as an admin) it ran successfully, but the same issue still occurs.

I need to be able to choose "Open with SAS 9.2" instead it seems that it is opening in "Batch Submit with SAS 9.2"

(This screen shot is from XP, and I want to duplicate it in Windows 7, though this option does not exist in the same fashion in Windows 7)

Edit File Type.jpg

Any other ideas?

I appreciate the effort.

-Brian

rgoetze
Calcite | Level 5

Brian,

Thanks for keeping this thread alive. I'm still hoping for a solution to this issue. However, most of my users have decided to use my original suggestion of using the right-click context menu to pick off Open with SAS 9.2.

Bob

BrianH_
Calcite | Level 5

Bob,

When I right-click context menu to pick Open with SAS 9.2, it still batch submits my programs and does not opening them in editor.

Windows 7 lacks some XP options that were really useful.

-Brian

rgoetze
Calcite | Level 5

Brian,

I have SAS 9.2 64-bit installed on Win 7 Enterprise O/S. I didn't do anything out of the ordinary and I get the following right-click context menu.

sas.jpg

I know that doesn't really help, but I've done several similar installs with the same results. This particular system has had Enterprise Guide uninstalled and reinstalled and the menu subtracted and then added the EG 4 entries you see.

Bob

DaveJ
Calcite | Level 5

I had the same issue. After I accidently selected V8.2 as an open with program, it worked somehow??

If you installed v8.2, EG, and v9.2, you may try the below steps.

- Go to Control Panel, Programs, and click Make a file type always open in a specific program.

- Choose the .sas extension, and click Change Program.

- Select V8.2 program (icon) from the list of programs available or in the section of Other Programs

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 35 replies
  • 37438 views
  • 5 likes
  • 13 in conversation