BookmarkSubscribeRSS Feed
htzcouto
Calcite | Level 5

I am trying to run a sas 9.3 batch program and there is the following error

 

insufficient authorization to access c:\Windows\system32

 

Thanks for the solution,

 

 

7 REPLIES 7
Kurt_Bremser
Super User

When reporting problems, make it a point to always include the complete log of the failed step(s).

In the case of a failed batch run, make sure that all necessary files (source, log, output) are specified with a full path that you have permission to use.

How are you running your batch program? (cmd window, batch file, powershell, VB script, scheduler)

htzcouto
Calcite | Level 5
This is the batch program

"c:\Program Files\SASHome\x86\SASFoundation\9.3\sas.exe" -sysin
"C:\Teste_Batch\prog1.sas"
-PRINT "C:\Teste_Batch\prog1.LST" -LOG "C:\Teste_Batch\prog1.LOG"

This is the message returned:


NOTE: Unable to open SASUSER.PROFILE. WORK.PROFILE will be opened instead.
NOTE: All profile changes will be lost at the end of the session.
ERROR: Insufficient authorization to access C:\Windows\system32\prog1.log.
htzcouto
Calcite | Level 5

Using Windows 7 with Task Scheduler

htzcouto
Calcite | Level 5

Windows 7 Professional

Quentin
Super User

I just hit a similar error.  In my case it was because I did not include the -log option, and it looks like when a scheduled task runs as administrator, it writes the log to c:\WINDOWS\system32.  I would double check that your -log option is in the command string.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 2224 views
  • 0 likes
  • 3 in conversation