Wednesday, March 23, 2011

Running a batch file on your IIS 6 server

You'll probably run into the same problem I did:

Microsoft VBScript runtime error '800a0046'  

Permission denied  
/<file>.asp, line <line>

MS discusses it a little here, but they say to make sure the windows account have access to all the files necessary to execute the code without identifying what files those are.  The ultimate solution that worked for me, after giving IUSR and IIS_WPG and NETWORK SERVICE access to everything I could think of, was to give IUSR and NETWORK SERVICE access to cmd.exe.  I don't have time to mess with it, but I suspect that IUSR hands the task off to NETWORK SERVICE and doesn't need permission on all the other items.  Maybe I'll play with it later to figure it out.

No comments: