472,338 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,338 software developers and data experts.

wscript.shell error

People; i'm from argentina so , sorry, but my english isnīt good...

Now, the question is; I'm trying to run a *.bat program on an ASP page,
with the wsh script, but i canīt do it... because i obtain an error code (5
access denied)
I let you the code that iīm using, so you can help me

Dim wshell, proc set wshell = server.createobject("wscript.shell")

prg="%comspec% /c net stop dns"
set proc = wshell.exec(prg)

Do While proc.Status < 1

Loop
Response.Write prg & "<br>"
Response.Write proc.StdOut.ReadAll & "<br>"
Response.Write proc.stderr.readAll & "<br>"
set wshell = nothing

.....

I tried besides, the "run" methon instead of "exec", but the result is the
same...
so ... help!!!
I have gave permissons (total control) to IWAM and IUSR users on the page
folder, and on cmd.exe program and net.exe program; but there isnīt case, it
doesnīt work...

Thanks for your suggestions; and sorry about my english... If you donīt
understand my , let me knot that, and i try to explain better...

Ferg

May 10 '06 #1
6 6421
In addition to needing NTFS permissions to the executables, the user account
executing the command needs permissions to run the command, itself. Someone
who is a GUEST, such as IUSR doesn't have the rights in Windows to start and
stop services. You could add your iusr account to the admin group (not real
advised) or run that page with a different anonymous account that is an
admin (a bit safer).

Ray at work

"ferg" <fgiletta@solsoft(punto)com(punto)ar> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
People; i'm from argentina so , sorry, but my english isnīt good...

Now, the question is; I'm trying to run a *.bat program on an ASP page,
with the wsh script, but i canīt do it... because i obtain an error code
(5 access denied)
I let you the code that iīm using, so you can help me

Dim wshell, proc set wshell = server.createobject("wscript.shell")

prg="%comspec% /c net stop dns"
set proc = wshell.exec(prg)

Do While proc.Status < 1

Loop
Response.Write prg & "<br>"
Response.Write proc.StdOut.ReadAll & "<br>"
Response.Write proc.stderr.readAll & "<br>"
set wshell = nothing

....

I tried besides, the "run" methon instead of "exec", but the result is the
same...
so ... help!!!
I have gave permissons (total control) to IWAM and IUSR users on the page
folder, and on cmd.exe program and net.exe program; but there isnīt case,
it doesnīt work...

Thanks for your suggestions; and sorry about my english... If you donīt
understand my , let me knot that, and i try to explain better...

Ferg

May 10 '06 #2
Thank you Ray, but what do you mean when you say "...or run that page with a
different anonymous account that is an
admin (a bit safer)." . How can i run the page with a different anonymous
account ? ...

Thanks again
Ferg

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> escribió en
el mensaje news:uz**************@TK2MSFTNGP04.phx.gbl...
In addition to needing NTFS permissions to the executables, the user
account executing the command needs permissions to run the command,
itself. Someone who is a GUEST, such as IUSR doesn't have the rights in
Windows to start and stop services. You could add your iusr account to
the admin group (not real advised) or run that page with a different
anonymous account that is an admin (a bit safer).

Ray at work

"ferg" <fgiletta@solsoft(punto)com(punto)ar> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
People; i'm from argentina so , sorry, but my english isnīt good...

Now, the question is; I'm trying to run a *.bat program on an ASP page,
with the wsh script, but i canīt do it... because i obtain an error code
(5 access denied)
I let you the code that iīm using, so you can help me

Dim wshell, proc set wshell = server.createobject("wscript.shell")

prg="%comspec% /c net stop dns"
set proc = wshell.exec(prg)

Do While proc.Status < 1

Loop
Response.Write prg & "<br>"
Response.Write proc.StdOut.ReadAll & "<br>"
Response.Write proc.stderr.readAll & "<br>"
set wshell = nothing

....

I tried besides, the "run" methon instead of "exec", but the result is
the same...
so ... help!!!
I have gave permissons (total control) to IWAM and IUSR users on the page
folder, and on cmd.exe program and net.exe program; but there isnīt case,
it doesnīt work...

Thanks for your suggestions; and sorry about my english... If you donīt
understand my , let me knot that, and i try to explain better...

Ferg



May 10 '06 #3
It's a configuration in IIS. You can set this at a site, application, or
file level. To do it at the file level for example:

- Create a new local account on the machine called "testaccount" or
something along those lines.

- Add this account to the local administrators group on the machine

- in IIS, browse to the file with the code in question. Right click ---
Properties

- Go to the File Security tab

- Under "Anonymous access and authentication control" click the Edit...
button

- Make sure that Anonymous access is checked

- Change the account from IUSR_... to this new test account and enter the
password.

Ray at work

"ferg" <fgiletta@solsoft(punto)com(punto)ar> wrote in message
news:%2******************@TK2MSFTNGP04.phx.gbl...
Thank you Ray, but what do you mean when you say "...or run that page with
a different anonymous account that is an
admin (a bit safer)." . How can i run the page with a different anonymous
account ? ...

Thanks again
Ferg

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> escribió en
el mensaje news:uz**************@TK2MSFTNGP04.phx.gbl...
In addition to needing NTFS permissions to the executables, the user
account executing the command needs permissions to run the command,
itself. Someone who is a GUEST, such as IUSR doesn't have the rights in
Windows to start and stop services. You could add your iusr account to
the admin group (not real advised) or run that page with a different
anonymous account that is an admin (a bit safer).

Ray at work

"ferg" <fgiletta@solsoft(punto)com(punto)ar> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
People; i'm from argentina so , sorry, but my english isnīt good...

Now, the question is; I'm trying to run a *.bat program on an ASP page,
with the wsh script, but i canīt do it... because i obtain an error code
(5 access denied)
I let you the code that iīm using, so you can help me

Dim wshell, proc set wshell = server.createobject("wscript.shell")

prg="%comspec% /c net stop dns"
set proc = wshell.exec(prg)

Do While proc.Status < 1

Loop
Response.Write prg & "<br>"
Response.Write proc.StdOut.ReadAll & "<br>"
Response.Write proc.stderr.readAll & "<br>"
set wshell = nothing

....

I tried besides, the "run" methon instead of "exec", but the result is
the same...
so ... help!!!
I have gave permissons (total control) to IWAM and IUSR users on the
page folder, and on cmd.exe program and net.exe program; but there isnīt
case, it doesnīt work...

Thanks for your suggestions; and sorry about my english... If you donīt
understand my , let me knot that, and i try to explain better...

Ferg



May 10 '06 #4
Thank you Ray; but it doesnīt work
it is still returning error 5, access denied...
I did everything you tell me, but it doesnīt work...
I donīt know what is going on...

Do you have any idea?...
Thank you again...
Ferg from Argentina

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> escribió en
el mensaje news:uG**************@TK2MSFTNGP04.phx.gbl...
It's a configuration in IIS. You can set this at a site, application, or
file level. To do it at the file level for example:

- Create a new local account on the machine called "testaccount" or
something along those lines.

- Add this account to the local administrators group on the machine

- in IIS, browse to the file with the code in question. Right click ---
Properties

- Go to the File Security tab

- Under "Anonymous access and authentication control" click the Edit...
button

- Make sure that Anonymous access is checked

- Change the account from IUSR_... to this new test account and enter the
password.

Ray at work

"ferg" <fgiletta@solsoft(punto)com(punto)ar> wrote in message
news:%2******************@TK2MSFTNGP04.phx.gbl...
Thank you Ray, but what do you mean when you say "...or run that page
with a different anonymous account that is an
admin (a bit safer)." . How can i run the page with a different anonymous
account ? ...

Thanks again
Ferg

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> escribió
en el mensaje news:uz**************@TK2MSFTNGP04.phx.gbl...
In addition to needing NTFS permissions to the executables, the user
account executing the command needs permissions to run the command,
itself. Someone who is a GUEST, such as IUSR doesn't have the rights in
Windows to start and stop services. You could add your iusr account to
the admin group (not real advised) or run that page with a different
anonymous account that is an admin (a bit safer).

Ray at work

"ferg" <fgiletta@solsoft(punto)com(punto)ar> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
People; i'm from argentina so , sorry, but my english isnīt good...

Now, the question is; I'm trying to run a *.bat program on an ASP
page, with the wsh script, but i canīt do it... because i obtain an
error code (5 access denied)
I let you the code that iīm using, so you can help me

Dim wshell, proc set wshell = server.createobject("wscript.shell")

prg="%comspec% /c net stop dns"
set proc = wshell.exec(prg)

Do While proc.Status < 1

Loop
Response.Write prg & "<br>"
Response.Write proc.StdOut.ReadAll & "<br>"
Response.Write proc.stderr.readAll & "<br>"
set wshell = nothing

....

I tried besides, the "run" methon instead of "exec", but the result is
the same...
so ... help!!!
I have gave permissons (total control) to IWAM and IUSR users on the
page folder, and on cmd.exe program and net.exe program; but there
isnīt case, it doesnīt work...

Thanks for your suggestions; and sorry about my english... If you donīt
understand my , let me knot that, and i try to explain better...

Ferg





May 10 '06 #5
I'm experiencing that also. It must have to do with the act of starting and
stopping services, as when I change the command to:

prg="%comspec% /c net send %computername% test"

That executes fine.

I played around with various local security policies on my machine (XP Pro
SP2) and was unable to get it to execute.

Ray at work
"ferg" <fgiletta@solsoft(punto)com(punto)ar> wrote in message
news:u9**************@TK2MSFTNGP02.phx.gbl...
Thank you Ray; but it doesnīt work
it is still returning error 5, access denied...
I did everything you tell me, but it doesnīt work...
I donīt know what is going on...

Do you have any idea?...
Thank you again...
Ferg from Argentina

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> escribió en
el mensaje news:uG**************@TK2MSFTNGP04.phx.gbl...
It's a configuration in IIS. You can set this at a site, application, or
file level. To do it at the file level for example:

- Create a new local account on the machine called "testaccount" or
something along those lines.

- Add this account to the local administrators group on the machine

- in IIS, browse to the file with the code in question. Right click ---
Properties

- Go to the File Security tab

- Under "Anonymous access and authentication control" click the Edit...
button

- Make sure that Anonymous access is checked

- Change the account from IUSR_... to this new test account and enter the
password.

Ray at work

"ferg" <fgiletta@solsoft(punto)com(punto)ar> wrote in message
news:%2******************@TK2MSFTNGP04.phx.gbl...
Thank you Ray, but what do you mean when you say "...or run that page
with a different anonymous account that is an
admin (a bit safer)." . How can i run the page with a different
anonymous account ? ...

Thanks again
Ferg

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> escribió
en el mensaje news:uz**************@TK2MSFTNGP04.phx.gbl...
In addition to needing NTFS permissions to the executables, the user
account executing the command needs permissions to run the command,
itself. Someone who is a GUEST, such as IUSR doesn't have the rights
in Windows to start and stop services. You could add your iusr account
to the admin group (not real advised) or run that page with a different
anonymous account that is an admin (a bit safer).

Ray at work

"ferg" <fgiletta@solsoft(punto)com(punto)ar> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
> People; i'm from argentina so , sorry, but my english isnīt good...
>
> Now, the question is; I'm trying to run a *.bat program on an ASP
> page, with the wsh script, but i canīt do it... because i obtain an
> error code (5 access denied)
> I let you the code that iīm using, so you can help me
>
> Dim wshell, proc set wshell = server.createobject("wscript.shell")
>
> prg="%comspec% /c net stop dns"
> set proc = wshell.exec(prg)
>
> Do While proc.Status < 1
>
> Loop
> Response.Write prg & "<br>"
> Response.Write proc.StdOut.ReadAll & "<br>"
> Response.Write proc.stderr.readAll & "<br>"
> set wshell = nothing
>
> ....
>
> I tried besides, the "run" methon instead of "exec", but the result is
> the same...
> so ... help!!!
> I have gave permissons (total control) to IWAM and IUSR users on the
> page folder, and on cmd.exe program and net.exe program; but there
> isnīt case, it doesnīt work...
>
> Thanks for your suggestions; and sorry about my english... If you
> donīt understand my , let me knot that, and i try to explain better...
>
> Ferg
>
>




May 10 '06 #6
so, it doesnīt work for you?

I donīt know what iīm going to do about this...

I've try to set permissons to "cmd.exe" and "net.exe" to the user that I
have created, but ... it doesnīt work at all...

So... i'm tired; here in Argentina it's 19.00 o'clock, so i will try another
things tomorrow

thanks a lot. (... do you understand me ? or I write like an Indian...
jajaja)
Ferg

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> escribió en
el mensaje news:el**************@TK2MSFTNGP05.phx.gbl...
I'm experiencing that also. It must have to do with the act of starting
and stopping services, as when I change the command to:

prg="%comspec% /c net send %computername% test"

That executes fine.

I played around with various local security policies on my machine (XP Pro
SP2) and was unable to get it to execute.

Ray at work
"ferg" <fgiletta@solsoft(punto)com(punto)ar> wrote in message
news:u9**************@TK2MSFTNGP02.phx.gbl...
Thank you Ray; but it doesnīt work
it is still returning error 5, access denied...
I did everything you tell me, but it doesnīt work...
I donīt know what is going on...

Do you have any idea?...
Thank you again...
Ferg from Argentina

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> escribió
en el mensaje news:uG**************@TK2MSFTNGP04.phx.gbl...
It's a configuration in IIS. You can set this at a site, application,
or file level. To do it at the file level for example:

- Create a new local account on the machine called "testaccount" or
something along those lines.

- Add this account to the local administrators group on the machine

- in IIS, browse to the file with the code in question. Right click ---
Properties

- Go to the File Security tab

- Under "Anonymous access and authentication control" click the Edit...
button

- Make sure that Anonymous access is checked

- Change the account from IUSR_... to this new test account and enter
the password.

Ray at work

"ferg" <fgiletta@solsoft(punto)com(punto)ar> wrote in message
news:%2******************@TK2MSFTNGP04.phx.gbl...
Thank you Ray, but what do you mean when you say "...or run that page
with a different anonymous account that is an
admin (a bit safer)." . How can i run the page with a different
anonymous account ? ...

Thanks again
Ferg

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> escribió
en el mensaje news:uz**************@TK2MSFTNGP04.phx.gbl...
> In addition to needing NTFS permissions to the executables, the user
> account executing the command needs permissions to run the command,
> itself. Someone who is a GUEST, such as IUSR doesn't have the rights
> in Windows to start and stop services. You could add your iusr
> account to the admin group (not real advised) or run that page with a
> different anonymous account that is an admin (a bit safer).
>
> Ray at work
>
> "ferg" <fgiletta@solsoft(punto)com(punto)ar> wrote in message
> news:%2****************@TK2MSFTNGP03.phx.gbl...
>> People; i'm from argentina so , sorry, but my english isnīt good...
>>
>> Now, the question is; I'm trying to run a *.bat program on an ASP
>> page, with the wsh script, but i canīt do it... because i obtain an
>> error code (5 access denied)
>> I let you the code that iīm using, so you can help me
>>
>> Dim wshell, proc set wshell = server.createobject("wscript.shell")
>>
>> prg="%comspec% /c net stop dns"
>> set proc = wshell.exec(prg)
>>
>> Do While proc.Status < 1
>>
>> Loop
>> Response.Write prg & "<br>"
>> Response.Write proc.StdOut.ReadAll & "<br>"
>> Response.Write proc.stderr.readAll & "<br>"
>> set wshell = nothing
>>
>> ....
>>
>> I tried besides, the "run" methon instead of "exec", but the result
>> is the same...
>> so ... help!!!
>> I have gave permissons (total control) to IWAM and IUSR users on the
>> page folder, and on cmd.exe program and net.exe program; but there
>> isnīt case, it doesnīt work...
>>
>> Thanks for your suggestions; and sorry about my english... If you
>> donīt understand my , let me knot that, and i try to explain
>> better...
>>
>> Ferg
>>
>>
>
>
>





May 10 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Bill | last post by:
I used to be able to run the following ASP code on our corp machine (W2K Server Edition and IIS-5) and successfully send a net-msg to anyone on our...
0
by: Kyle | last post by:
To any who chose to provide an answer, or even any suggestions to this problem, I thank you greatly in advance. +200 pts. for any valid solutions....
2
by: bbxrider | last post by:
for win2k adv server/iis5.0 trying to run an external program from my asp routine that has multiple parameters, see following set shell =...
6
by: MacKenzie | last post by:
The statement in an asp page: dim objShell Set objShell = WScript.CreateObject("WScript.Shell") now gives this error: VB err= 424,Object...
2
by: rcmail14872 | last post by:
I have seen some very general suggestions for alternative code to the WScript.Shell code, but nothing specific. In the two lines of code below (I...
2
by: Mike John | last post by:
I am trying to use the shell object to send keys to the explorer browser to run the send page funcion. I am receiving the above error only when I...
0
by: AirYT | last post by:
Done a bunch of searching on this topic and i have come up with nothing. I have a .vbs script that i wish to execute by calling an asp page. i...
0
by: arunpatil84 | last post by:
Hi , I am working on one ASP.NET application which zips the document files and allow the user to download the files. For that I am using...
2
by: =?Utf-8?B?VG9kZA==?= | last post by:
Hello I'm using the following script to try and ping: <% Response.Buffer = true %> <% url = "www.espn.com" Set objWShell =...
2
by: =?Utf-8?B?c3RldmV3YQ==?= | last post by:
Microsoft VBScript runtime error '800a0046' Permission denied ======================= Trying to find the solution is driving me crazy. Using...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.