Need help running an executable with ASP (permission troubles).

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zensunni
    New Member
    • May 2007
    • 101

    Need help running an executable with ASP (permission troubles).

    This is the code I'm using:

    Code:
        set wshell = CreateObject("WScript.Shell") 
        wshell.run "C:\<websitedir>\test.bat"
        set wshell = nothing
    I've been getting this error:

    Code:
    Microsoft VBScript runtime  error '800a0046'
    
    Permission denied
    
    /<scriptname>.asp, line 3
    The bat file has been given IUSR_<Machine_n ame> permissions, but it still produces permission errors.

    BTW, it's IIS ver 5.1
  • DrBunchman
    Recognized Expert Contributor
    • Jan 2008
    • 979

    #2
    Do you have any problems running other exe's using shell? If you try and run Excel or something like that does it still give you the error?

    Dr B

    Comment

    • zensunni
      New Member
      • May 2007
      • 101

      #3
      Okay, I was able to open excel with this script. At first I expected excel to just open up, but nothing happened. There were no errors in the script, so i checked the processes. I noticed that it had been opened under SYSTEM.

      Thanks for giving me a starting point. I'll keep checking different things.

      [edit] Update: I think the exe that runs the batch file is what's denying permission. In any case, I just bypassed the bat, and ran the executable directly. If I need to, I can just run multiple commands through the asp script.

      Thanks again for your help.

      Comment

      • DrBunchman
        Recognized Expert Contributor
        • Jan 2008
        • 979

        #4
        No problem, for what it was worth!

        Glad you got it sorted.

        Dr B

        Comment

        Working...