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

Hello Team,

 

I am not able to create a schedule in SAS Enterprise Guide. I am using 5.1. When ever I am trying to schedule a project by File>Schedule Project I am getting the error.

Application Error
SAS Enterprise Guide has encountered a problem
We recommend that you save your work and restart SAS Enterprise Guide.

-------------------------------------------------------------------------------------------------------
Exception information
-------------------------------------------------------------------------------------------------------

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))


-------------------------- Technical Information Follows --------------------------

Exception Details:
----------------------------------------
Exception type: System.UnauthorizedAccessException
Message: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
Source: SAS.EG.Utilities
Target Site: NewWorkItem

 


SAS.jpg
1 ACCEPTED SOLUTION

Accepted Solutions
CaseySmith
SAS Employee

If explicitly running EG as an administrator (http://www.tenforums.com/tutorials/3436-run-administrator-windows-10-a.html) does not avoid the error when scheduling, the only other workaround I can think of is to manually schedule the task in Windows Task Scheduler to run the .vbs file (default attached; you'll have to remove the .txt extension from the file name and edit the prjName property in it to point to your .egp) that runs the desired EG project.

 

The action: "Start a program"

For 32-bit EG:

Program/script: C:\Windows\SysWOW64\cscript.exe (for 32-bit EG)

Add arguments: "C:\Users\cassmi\Desktop\EGScript1.vbs" (path to .vbs file)

For 64-bit EG:

Program/script: C:\Users\cassmi\Desktop\EGScript1.vbs


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

View solution in original post

8 REPLIES 8
Kurt_Bremser
Super User

This http://support.sas.com/kb/58/247.html might be of help for you.

 

As I always say, do not run a major Windows version in production until at least SP2 has been released. And the SW vendors had time to deal with the rotten-brain ideas that MS decided to put into it.

Right now the Windows version to use is 7. 10 is in open beta-test at the moment.

 

PS the link above is the first result of a google search for "sas enterprise guide schedule project Access is denied."

I have found that simply using the error message from a SAS product in connection with the product name in google will get you a good hint for the solution most of the time (>90%)

sas_bh
Fluorite | Level 6

Thanks Kurt for the reply. I tried this option but its not working.

CaseySmith
SAS Employee

I'm surprised Kurt's suggestion (explicitly running EG as an administrator) did not allow you to workaround.  Usually the "access is denied" error related to scheduling is a result of the user not having permissions to create Windows Scheduled Tasks.  As a test, I suggest opening the Windows Task Scheduler and seeing if you are able to create a simple scheduled task.

 

Casey


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

sas_bh
Fluorite | Level 6

Yes I tried creating a job from task scheduler and I can succesfully run the job. I tried running a progam SEGuide.exe. But whenever I try using SAS Enterprise Guide I am getting the error

CaseySmith
SAS Employee

If explicitly running EG as an administrator (http://www.tenforums.com/tutorials/3436-run-administrator-windows-10-a.html) does not avoid the error when scheduling, the only other workaround I can think of is to manually schedule the task in Windows Task Scheduler to run the .vbs file (default attached; you'll have to remove the .txt extension from the file name and edit the prjName property in it to point to your .egp) that runs the desired EG project.

 

The action: "Start a program"

For 32-bit EG:

Program/script: C:\Windows\SysWOW64\cscript.exe (for 32-bit EG)

Add arguments: "C:\Users\cassmi\Desktop\EGScript1.vbs" (path to .vbs file)

For 64-bit EG:

Program/script: C:\Users\cassmi\Desktop\EGScript1.vbs


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

sas_bh
Fluorite | Level 6

Thanks for your response. I tried modifying your vbs script. Made change in the project name and updated set app = to point to EG 5.1. I am getting an error object required. Not sure what went wrong.

 

Option Explicit
Dim app

Call dowork

'shut down the app
If not (app Is Nothing) Then
app.Quit
Set app = Nothing
End If


Sub dowork()
On Error Resume Next
'----
' Start up Enterprise Guide using the project name
'----
Dim prjName
Dim prjObject

prjName = "C:\Users\hbasheer\Desktop\Project1.egp" 'Project Name

Set app = CreateObject("SASEGObjectModel.Application.5.1")
If Checkerror("CreateObject") = True Then
Exit Sub
End If

'-----
' open the project
'-----
Set prjObject = app.Open(prjName,"")
If Checkerror("app.Open") = True Then
Exit Sub
End If


'-----
' run the project
'-----
prjObject.run
If Checkerror("Project.run") = True Then
Exit Sub
End If


'-----
' Save the new project
'-----
prjObject.Save
If Checkerror("Project.Save") = True Then
Exit Sub
End If

'-----
' Close the project
'-----
prjObject.Close
If Checkerror("Project.Close") = True Then
Exit Sub
End If

End Sub

Function Checkerror(fnName)
Checkerror = False

Dim strmsg
Dim errNum

If Err.Number <> 0 Then
strmsg = "Error #" & Hex(Err.Number) & vbCrLf & "In Function " & fnName & vbCrLf & Err.Description
'MsgBox strmsg 'Uncomment this line if you want to be notified via MessageBox of Errors in the script.
Checkerror = True
End If

End Function


error.png
sas_bh
Fluorite | Level 6

Casey. I am able to run the VB script now and sas project is getting executed.

c:\windows\syswow64\cscript.exe C:\Users\hbasheer\Desktop\egjob.vbs

 

Scheduling via Enterprise guide is still an issue.

 

CaseySmith
SAS Employee

Hi @sas_bh, glad you were able to get the VB script working, such that you have a workaround for scheduling the project.

 

I wish I could help with the issue you are encountering scheduling via EG 5.1.  The "Access denied" errors while scheduling from EG are usually due to permissions settings, which can be worked around by running EG as an administrator.  However, since that isn't helping in your case, I'm not sure what else to try.  I do know changes have been made in the way EG creates scheduled tasks (related to permissions) in our more recent releases (ex. 7.12 HF3).  There is a reasonable chance your issue is resolved in the latest version (7.12 HF3).


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 8 replies
  • 4645 views
  • 2 likes
  • 3 in conversation