Re: wsh, bat, win2003, ASP
From: Torgeir Bakken \(MVP\) (Torgeir.Bakken-spam_at_hydro.com)
Date: 02/03/05
- Next message: Torgeir Bakken \(MVP\): "Re: list or monitor for deleted a User Account in Active Directory"
- Previous message: Sharon: "wsh, bat, win2003, ASP"
- In reply to: Sharon: "wsh, bat, win2003, ASP"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 03 Feb 2005 17:22:01 +0100
Sharon wrote:
> Hi,
> An ASP page on Win2000, IIS5, uses wsh to execute a bat file that runs an
> ldap command in cmd.exe. Works great.
> Had to move to Win2003, IIS6, and now it doesn't work.
>
> It works fine if I type it manually via the command prompt. Does not work
> through the ASP page, so I'm focused on IIS and wsh.
Hi
Most likely you need to change the ACL on CMD.EXE/CSCRIPT.EXE
/WSCRIPT.EXE.
Here is a previous post I would think is relevant from this thread:
http://groups.google.com/groups?threadm=OdKF%23L75DHA.2488%40TK2MSFTNGP09.phx.gbl
From: David Wang [Msft] (someone@online.microsoft.com)
Subject: Re: wsript.shell problem
Newsgroups: microsoft.public.windows.server.scripting
Date: 2004-01-30 20:32:47 PST
<quote>
ACLS on CSCRIPT.EXE (indeed, all of the commandline EXE in SYSTEM32) changed
on Windows Server 2003 to make it impossible for non-Administrators to
execute them when accessed via IIS. This is for security purposes. I
suspect that when running with wscript, a popup declaring "Access Denied"
happened, but since it's in another window station, you can't see it and
dismiss the dialog... so the script got stuck right there. I suspect that
when running with cscript, you are still getting "Access Denied", but this
time it's a console app, so the process just exited.
I suggest you first enable authentication, authenticate as Administrator,
and then try WshShell.Run again.
If you change ACLs, realize that you are consciously weakening your server's
security, so choose wisely.
Personally, the code you have in the VBS file can be placed in an ASP file
and parameterized, so you do not need to use WshShell.Run to run it.
</quote>
-- 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/default.mspx
- Next message: Torgeir Bakken \(MVP\): "Re: list or monitor for deleted a User Account in Active Directory"
- Previous message: Sharon: "wsh, bat, win2003, ASP"
- In reply to: Sharon: "wsh, bat, win2003, ASP"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|