For security reasons, pages executed by IIS are prohibited from running any
commandline programs (especially those under System32, including cmd.exe).
You can break some ACLs or elevate user privileges to "make it work", but
realize that you are responsible for compromising your own system's
security.
Also, commands/scripts involving CMD.EXE (such as the .cmd files) cannot be
launched by pages executed by IIS, and there is no work-around other than
rewriting CMD.EXE itself.
Unfortunately, what you want to do can also allow a hacker to easily
compromise your server, so for security reasons we are preventing both
hackers and you from those actions -- even if they worked on prior
Windows/IIS versions.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Rashmi Jagadish" <RashmiJagadish DeleteThis @discussions.microsoft.com> wrote in
message news:4CFAF99F-8F92-44EB-908D-93F8D73ADCB3@microsoft.com...
Craig,
Thanks for your reponse.
I progressed a wee bit ... but again running into problems.
I gave the IWMA, ISSPublicAccess account admin privs on the server.
I can execute some shell command but some other I cannot.
For instance
Response.Write(myexec.execute("ipconfig /all")) --WORKS FINE
Response.Write(myexec.execute("at 10:15
D:\AutoApps\HealthCheck\Scripts\DSS_ACCESS_Check.cmd")) -- DOES NOT WOR
Response.Write(myexec.execute("SCHTASKS /Run /TN DSS_ACCESS_Check")) --
DOES NOT
The error I get is
Access is denied.
ERROR: Could not read key from registry
Error creating process
The system cannot find the file specified
"anonymous@discussions.microsoft.com" wrote:
> Hello Rashmi,
>
> For Win2003 you need:
> - IIS_WPG
> - IWAM
> - Sometimes IUSR
>
> If you would like to correspond further, I have created a
> temporary email address you can contact me at:
>
> RASHMI1-CONTACT-CRAIG DeleteThis @GNIS.NET
>
> Sincerely,
>
> Craig
>
>
>
> >-----Original Message-----
> >I'm trying to use the wscript.shell in an asp page
> running on IIS6
> >
> > response.Write "WSCRIPT.SHELL EXAMPLE <BR>"
> > dim wshell, intReturn
> > set wshell = server.createobject("wscript.shell")
> > intReturn = wshell.run("ipconfig", 0, True)
> > response.Write intReturn & "<BR>"
> >
> >
> >The script works ok on 2000 systems, but fails on 2003
> with the following
> >error
> > Microsoft VBScript runtime error '800a0046'
> > Permission denied
> >
> >I tried giving IWMA_servername account read and execute
> permissions.
> >But and IUSR_servername account does not exist on this
> server.
> >
> >I've searched extensively but nothing. Any help is
> greatly appreciated
> >
> >.
> >
><!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: IIS 6.0 and Wscript.shell