Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / COM / May 2005



Tip: Looking for answers? Try searching our database.

ActiveX Permission Denied Error from Sch Task

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
CSundquist - 20 May 2005 15:36 GMT
I have a VB app that I am trying to launch by way of scheduled task.  The app
references an ActiveX exe and fails when I try to create an instance of this
object.  I receive Error #70 Permission Denied.  I only receive the error
when I try to launch the app by scheduled task.  

I can log on to the machine with the account I have setup to run the
scheduled task as and manually execute the application without error.  Only
when I try to launch the application by way of scheduled task do I recieve
the permission denied error.

Does anyone have any ideas?
Ken Halter - 20 May 2005 16:41 GMT
>I have a VB app that I am trying to launch by way of scheduled task.  The
>app
[quoted text clipped - 10 lines]
>
> Does anyone have any ideas?

The only thing I can suggest is that you add error trapping to help locate
the line of code that's raising the error. When you find that, post back
with as many details as you can share so we can help find a "fix"

Signature

Ken Halter - MS-MVP-VB - http://www.vbsight.com
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
Sign up now to help keep VB support alive - http://classicvb.org/petition
Please keep all discussions in the groups..

CSundquist - 20 May 2005 19:23 GMT
My code reads like this:

Dim objArchive As Archive.Lookup

On Error Goto ErrorHandler

LogEvent "Creating Lookup Object..."
Set objArchive = New Archive.Lookup
LogEvent "Finished Creating Lookup Object."

LogEvent is a procedure I added to log what was going on...My app never gets
to "Finished Creating Lookup Object."  Instead I get Error #70 Permission
denied.

I have been successful launching the application from the scheduled task
using the sysadmin account.  (Which is not desirable...).  I have tried
adding the account I am using for the scheduled task to the local admin group
on the server and running it that way, with no success.  

The exe, the ActiveX exe I am referencing, and the scheduled task are all on
the same server.

> >I have a VB app that I am trying to launch by way of scheduled task.  The
> >app
[quoted text clipped - 14 lines]
> the line of code that's raising the error. When you find that, post back
> with as many details as you can share so we can help find a "fix"
Tony Proctor - 22 May 2005 11:17 GMT
Try using dcomcnfg.exe to set the permissions on the ActiveX EXE, e.g. make
it run under a specific account (different to that of the scheduled task)

       Tony Proctor

> My code reads like this:
>
[quoted text clipped - 36 lines]
> > the line of code that's raising the error. When you find that, post back
> > with as many details as you can share so we can help find a "fix"
CSundquist - 24 May 2005 15:02 GMT
Setting permissions in DCom worked.  The account I was using to launch the
scheduled task had permissions to launch the ActiveX exe but did not have
permissions to access it (not sure why it was setup this way...).  

Thanks.

> Try using dcomcnfg.exe to set the permissions on the ActiveX EXE, e.g. make
> it run under a specific account (different to that of the scheduled task)
[quoted text clipped - 52 lines]
> http://classicvb.org/petition
> > > Please keep all discussions in the groups..
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.