BookmarkSubscribeRSS Feed
Obsidian | Level 7
I have come across several SAS Options that must be set at invocation or in the autoexec file. Since I am running EG on a server, I am not able to change the config or autoexec files.

I ran across an article at "" that tell you to create a shortcut and place the option in the target such as:
"C:\Program Files\SAS\Enterprise Guide 4\SEGuide.exe" -sasInitialFolder="."
The article was made for PC SAS, and when I try in EG, I get the error "Specified cast is not valid.

Similarly, I tried passing this as a parameter from the command prompt :
seguide.exe -sasInitialFolder="."
This did not work.

Is there a way to pass options on invocation?
Christopher Johnson
SAS Employee
Are you running EG 4.1 or 4.2? The reason I ask is that there are ways in both pieces of software for the client to have statements submitted up front. EG 4.1 used something called EGAuto; EG 4.2 has an option to submit code when connecting to the server for the first time.
Obsidian | Level 7
I am running 4.1. I found the file, and added this line to the end:
OPTIONS sasinitialfolder="\\Shared\SAS\";
but it is not having an effect. Am I doing this correctly?

Christopher Johnson
Opal | Level 21
I believe that options which can only be set during SAS invocation are not meant to be overwritten by users.

If - for example - a site admin decides not to allow x-commands (shell escape) for SAS EG sessions for security reasons then a user should not be able to overwrite these settings.
Community Manager
For those options that can be set in an autoexec (options you can specify with an OPTIONS statement), you can use this tip:

For invocation options (also known as command options, dash options, config options), you must specify these on the SAS command (not the SEGuide command) -- so you'll need the help of an admin to do that.

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!
SAS Employee
For version 4.1, putting a statement in that file should do it. That should be located under:

C:\Documents and Settings\\Application Data\SAS\Enterprise Guide\4\

where obviously you'd want to replace with the appropriate value. Make sure the version of you changed was for your userid. If that still doesn't work, I'd probably check with SAS tech support ( There were some issues with EGAuto in version 3.0 but those should have been resolved by version 4.1. As Chris mentions, it may be that you're trying to change an option that must be set in a config file. I've never played with sasinitialfolder= so I can't speak to any details on that.


Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.


Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 4 in conversation