Mombu the Microsoft Forum sponsored links

Go Back   Mombu the Microsoft Forum > Microsoft > WScript.Shell
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 6th March 22:07
guoqi zheng
External User
 
Posts: 1
Default WScript.Shell



Dear sir,


I tried everything I knew already, however, I just can not get WScript.Shell
to run on a windows 2003 server.

The page didn't return any error,but if I change objShell.run(ExeName) to
objShell.Run ExeName, 1, True. True means that the asp will wait for the
outcome that vbs script, then the whole IIS server will halt.

Below is my code, can some one point out what I did wrong here? Or is there
a bug of windows 2003 server?


on error resume next
dim sNow
dim eNow
sNow = now()
dim ExeName
ExeName = "e:\vbs\test.vbs"
Set objShell = Server.CreateObject("WScript.Shell")
objShell.Run(ExeName)
Set objShell = Nothing

eNow = now()

Response.Write("start at"&sNow&"<br>")
Response.Write(eNow)

response.Write(err.description)


--
Met vriendelijke groet,

Guoqi Zheng
Tel: +31 (0) 23 5343545
http://www.meetholland.com
  Reply With Quote


  sponsored links


2 6th March 22:07
torgeir bakken (mvp)
External User
 
Posts: 1
Default WScript.Shell



Hi

Note that Windows 2003 / IIS 6 does not implicitly allow access to
external system functions to anyone other than administrators.

So if this user running the asp page is not an administrator, I think
you will need to add the user (ot a group he/she is a member of) to the
exe file's ACL list and giving Read and Execute permission.

If this is a console based exe, I would think you need to to this for
cmd.exe as well.


--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter
  Reply With Quote
3 6th March 22:07
guoqi zheng
External User
 
Posts: 1
Default WScript.Shell


Hi, Thanks too much from your reply. I am really in a hopeless situation at
this moment. Please try to help me out and don't give up.

I think I did use an administrators for the Internet guest account. I even
take off anonymous access and login by one of the administrators to execute
the asp file.

I have no any luck. This is our main application. It will be horrible for us
if we can not move it to our new server.

Any idea how can I find out the error now?

--
Met vriendelijke groet,

Guoqi Zheng
Tel: +31 (0) 23 5343545
http://www.vitaminstore.nl

"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> дÈëÏûÏ¢ÐÂÎÅ
:40141A6D.93838B8D@hydro.com...
  Reply With Quote
4 6th March 22:07
torgeir bakken (mvp)
External User
 
Posts: 1
Default WScript.Shell


Hi

Sorry, I have no experience from IIS or ASP, so I hope somebody else can jump in
here to help you further. It might be that there is a better IIS 6/ASP newsgroup
than a scripting to post this issue in as well.

--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter
  Reply With Quote
5 6th March 22:07
guoqi zheng
External User
 
Posts: 1
Default WScript.Shell


Ok, thanks anyway. I am really thinking it might be a bug of IIS6, any idea
how can I report a bug to microsoft?

--
Met vriendelijke groet,

Guoqi Zheng
Tel: +31 (0) 23 5343545
http://www.meetholland.com
"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> дÈëÏûÏ¢ÐÂÎÅ
:40143659.89A5513A@hydro.com...
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666