Dear Miss SAS Answers,
We recently upgraded to SAS 9.2 (PC Version) and now when I double click on the SAS icon on the desktop, the program automatically executes rather than simply opening in the program editor. How do I change this so that double-clicking the desktop icon equals open program in editor rather than run program?
Help us Miss SAS Answers! You're our only hope!
"C:\Program Files\SAS\SASFoundation\9.2\sas.exe"
-CONFIG "C:\Program Files\SAS\SASFoundation\9.2\nls\en\SASV9.CFG"
"C:\Program Files\SAS\SASFoundation\9.2\sas.exe"
-CONFIG "C:\Program Files\SAS\SASFoundation\9.2\nls\en\SASV9.CFG" <strong>
"C:\workshop\jobs.sas"</strong>
6 Comments
sounds like a change from the old SAS OLE Automation server action
It becomes a bit subtle to control
so I get lazy and for casual opening of code, I have selected default action NOTEPAD.exe
For more serious action, like regular or ad-hoc occasional batch processes, I set up a special icon and folder for each of these SAS programs.
For code development, I always have a SAS session (or 2) open so no need for a new session for each new program. SAS Viewer looks alternative is "smarter" but NOTEPAD is "lighter" and faster".
I believe that you really need to no what is in the autoexec file as well as the config file. Either of those files has the ability to "execute" SAS code.
A possible point of confusion here is what Unwilling Runner is actually doing that causes a SAS program to run. I suspect it may be double clicking the icon of a .sas file (a running man icon) that happens to reside on the desktop rather than the SAS application icon (the inverted triangle). If so, the the Windows file type mapping may be the problem. It has been for me in the past and not having admin privilege I had to resort to right clicking and picking the 9.2 for Windows entry vs. the 9.2 SAS entry for "open with ...". It is an annoying problem to have and can even lead to overwrites and the like that you do NOT want.
Hi Michael,
I had a similar situation. In an earilier release of SAS, if I had SAS already open and I'm working on code, if I navigated to Windows Explorer and double-clicked on a SAS program, it would open up in the same SAS editor window in which I was already working. It wouldn't execute as I gather happens with 9.2, but it did get in my way.
I configured my desktop so that when I double-click on a SAS program, it will open in SAS Viewer so I can read and/or print it. This works out much better for me. The trade-off is that when I want to modify or execute a program in SAS, I have to start SAS and then deliberately open it.
As I said, this works much better for me. I hope it helps.
P.S. - You can use SAS Viewer to modify SAS code. However, I prefer not to. I prefer to keep SAS Viewer as a Viewer only. I also find that since I have modified my print settings in SAS for output, that it's really far more convenient to print programs with SAS Viewer so I don't have to keep changing my print settings in SAS.
Good luck.
I tried your solution for stopping automatic program execution and it didn't help. My shortcut had the "C:\Program Files\SAS\SASFoundation\9.2\sas.exe"
as sell as a config-, an -autoexec, and a -sasinitialfolder .
Removing them didn't help. Is there a Plan B for just opening a program in SAS?
Hi Michael,
You can try creating your own shortcut on your desktop. In Windows Explorer, navigate to C:\Program Files\SAS\SASFoundation\9.2. Right click sas.exe and select Create Shortcut from the pop up menu. This will create a shortcut to the sas.exe file in the C:\Program Files\SAS\SASFoundation\9.2 folder which you can drag and drop onto your desktop to create a new SAS 9.2 icon. If you right click the new SAS 9.2 icon and select Properties from the pop up menu, you should see only the executable ("C:\Program Files\SAS\SASFoundation\9.2\sas.exe"). If you want to add your configuration file, add the following after the executable:
[space]-CONFIG[space]"C:\Program Files\SAS\SASFoundation\9.2\nls\en\sasv9.cfg".
(Replace [space] with the space bar from your keyboard.)
Let me know if this works for you.
Miss SAS Answers