Re: Error 800a0046 when trying to run a program

From: Ray Costanzo [MVP] (my)
Date: 09/22/04


Date: Wed, 22 Sep 2004 10:33:18 -0400

Can you post all of your code, or at least all that is relevant here? See,
you shouldn't be getting access denied's based on what the batch file is
doing. If you (iusr) have access to cmd.exe, that's about as far as ASP can
"see." If the batch file is trying to do something unauthorized, this error
would be returned to the stdout from the command prompt, which would not be
bounced back into an ASP error. Like, if you ran "cmd.exe /c net start
[some service]" and your IUSR account isn't authorized to do this, you would
not see this error. Now, if your IUSR didn't have NTFS permissions to
cmd.exe, for example, then you'd see a permission denied error.

Are you positive that your iusr account is authorized to access cmd.exe?

Ray at work

"Patrice FRITSCH" <patrice.fritsch@NOSPAM.com> wrote in message
news:%23$Pa6xKoEHA.2024@TK2MSFTNGP09.phx.gbl...
> Hello Ray,
>
> Running oWSH.Run("cmd.exe /c dir > toto.txt", 0, true) works fine
> Running oWSH.Run("cmd.exe /c toto.bat > toto.txt", 0, true) does'nt work
> (toto.bat contains only one line : DIR !!!)
> Is there something else that can prevent the running of a batch file ?
>
>
>
>> Do you have any antivirus software running on the server that may prevent
>> the creation of WScript.Shell, perhaps?
>>
>> Ray at work
>>
>> "Patrice FRITSCH" <patrice.fritsch@NOSPAM.com> wrote in message
>> news:e2pyCu6nEHA.3988@tk2msftngp13.phx.gbl...
>> > I'm trying to run a batch file from an asp page using WScript.Shell
>> > object.
>> >
>> > Dim oWSH
>> > set oWSH= Server.CreateObject("WScript.Shell")
>> > call oWSH.Run("cmd.exe /c " & szCmd , 0, true)
>> >
>> > szCmd contains the program to execute (fop.bat with several
>> > parameters).
>> >
>> > But I'm getting the following error message :
>> >
>> > Microsoft VBScript runtime error '800a0046'
>> > Permission denied
>> >
>> >
>> > The IUSR_xxxx has full control access to the directory containing the
> asp
>> > page.
>> > Works fine on a Windows 2000 Server but not on an 2003 server.
>> >
>> >
>>
>>
>
>



Relevant Pages

  • Re: Microsoft VBScript runtime error 800a0046
    ... Be sure that your IUSR account has NTFS permissions to write files to ... >>Ray at work ... > ASP ...
    (microsoft.public.inetserver.asp.components)
  • Re: adding assembly to windowsassembly through bat file
    ... gacutil was the way:) ... > I am creating an assembly which needs to be accessibly from an ASP ... > So i've made a batch file to do it. ... > assembly folder. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Server.CreateObject("Wscript.Shell")
    ... Its hard to run anything like that from a asp page for security reasons. ... The batch file reads a text file that has all of the ftp commands to get a ... asp page that shows how to accomplish this on Windows XP or Windows Server ...
    (microsoft.public.scripting.wsh)
  • Re: VB component works correctly only in debug mode
    ... >I have a Vb component which internally uses an exe to create a batch file, ... >I call the method of this component from my asp page. ... When I debug throught ... Does the fact that I run an exe ...
    (microsoft.public.vb.general.discussion)
  • VB component works correctly only in debug mode
    ... I have a Vb component which internally uses an exe to create a batch file, ... I call the method of this component from my asp page. ... When I debug throught ...
    (microsoft.public.vb.general.discussion)