WScript.Shell

From: jim (anonymous_at_discussions.microsoft.com)
Date: 06/08/04


Date: Tue, 8 Jun 2004 09:01:01 -0700

I am trying to use run function of WScript.Shell in my asp code to simply open a notepad for test.
if I use
<%
Dim WshShell, intReturn
Set WshShell = server.CreateObject("WScript.Shell")
intReturn = WshShell.run ("C:\winnt\system32\notepad.exe")
Response.Write(intReturn)
%>
nothing happened I got "0" as return value.

then I used
<%
Dim WshShell, intReturn
Set WshShell = server.CreateObject("WScript.Shell")
intReturn = WshShell.run ("C:\winnt\system32\notepad.exe", 0, true)
Response.Write(intReturn)
%>
the browser will never finish opening this page, after a few tries, i got the error message "HTTP 403.9 - Access Forbidden: Too many users are connected". I have to restart my computer to restore the IIS. (even restart the web site from IIS, or uncheck "HTTP keep-alives enabled" won't restore IIS

Can anybody tell me what's going on?

Thanks a lot.



Relevant Pages

  • Re: Reading vs. Checking Registry Key
    ... Dim WshShell, bKey, sKey, sValueBad, sValueGood ... Set WshShell = WScript.CreateObject ... createobject.regRead sKeyPath ...
    (microsoft.public.scripting.vbscript)
  • Re: xcopy date problem
    ... together into US format if the shortdate setting in the registry is ... Set wshShell = CreateObject ... 'Reads the shortdate format from the system registry ... Dim wshShell, dtmDate, strKey, strDateFormat, arrDate ...
    (microsoft.public.windows.server.scripting)
  • Re: VBScript added to Scheduled Task
    ... Set wshShell = CreateObject ... This is the window ... I created a very simple vbscript that runs notepad: ... Dim WshShell, oExec, s ...
    (microsoft.public.scripting.vbscript)
  • How to pass values to a vbscript function?
    ... I pulled the following client-side script from an ASP page. ... Dim WshShell, oExec, HostIP ... Set WshShell = CreateObject ... Set oExec = WshShell.Exec("C:\Program Files\Netop Remote ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Login/Logout auditing
    ... Dim WSHShell ... Dim WSHNetW ... Set WSHShell = WScript.CreateObject ... and for logoff just change the Logged on to Logged Off... ...
    (microsoft.public.backoffice.smallbiz2000)