The problem is we run our SAS code from Task scheduler using the built-in VBS (vbscript); other users get on the remote automation system and switch profiles. So when my schedule runs it has the wrong profile and doesn't run, it just sits at a pronmpt for credentials. I found a solution though, good info if others need to switch profile prior to running SAS through automation. You just need to run a script or .bat file, to replace the config file (its an XML file). Just create a copy of the current config XML, and there is a line in the file that says which profile is set to active; in your copy just put the profile you want as Active, other than that line the file should stay the same. Then have your script/.bat file replace that file, prior to running your SAS code. If someone changes profile manually later, your automation will cahnge it back prior to your SAS running. I am using this process now, and it works perfect. - Line in XML file: <Settings> <ActiveProfile>Profile 1</ActiveProfile> <GenerateLocalServer>True</GenerateLocalServer> </Settings> </Configuration> - Line in your XML: <Settings> <ActiveProfile>Profile 2</ActiveProfile> <GenerateLocalServer>True</GenerateLocalServer> </Settings> </Configuration> - Location of config file (in Windows): C:\Users\%username%\AppData\Roaming\SAS\MetadataServerProfiles - XML file original: ConfigurationV71.xml - XML your copy (you can name whatever): ConfigurationV71_Profile2.xml - Script/.Bat: Copy C:\Users\%username%\AppData\Roaming\SAS\MetadataServerProfiles\ConfigurationV71_Profile2.xml C:\Users\%username%\AppData\Roaming\SAS\MetadataServerProfiles\ConfigurationV71.xml /y - Additional Info: All profile names are listed in this XML file, in the Profiles section (<<Profile1>>, etc...), so just find the one you need and put in the active line.
... View more