Re: Running a VBS file from IIS/ASP

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Paul Lynch (paul.lynch_at_nospam.com)
Date: 04/19/04


Date: Mon, 19 Apr 2004 11:54:03 +0100

On 19 Apr 2004 02:21:08 -0700, google@colinsteadman.com (Colin
Steadman) wrote:

>I'm trying to setup an IIS/ASP webpage to run a .VBS script file. The
>VBS file is a scheduled task and the Intranet page will allow users to
>run it at any time.
>
>To do this I'm using the following code in my ASP page:
>
>Set oShell = Server.CreateObject ("WScript.shell")
> oShell.run Server.Mappath("test.vbs")
>Set oShell = Nothing
>
>
>The TEST.VBS which runs on the web server contains the following
>commands:
>
>On Error Resume Next
>Set oShell = CreateObject ("WScript.shell")
> oShell.run "sqlplus myUsername/myPassword@database @testsql.sql"
> oShell.run "net send myUsername Task Submitted"
> oShell.LogEvent 0, "TEST.VBS submitted a task."
>Set oShell = Nothing
>
>
>The problem I have is that the sqlplus line does not work. I get the
>NET SEND message ok, and I even get the event in Event Log, but the
>sqlplus command appears to hang and leave a sqlplus.exe process
>running at 0 CPU% as IWAM_SERVERNAME in the Task Manager until I kill
>it.
>
>If I run the VBS file manually on the server as myself it runs fine,
>so I assume its a permissions problem. I have therefore given the
>IUSR_SERVERNAME and IWAM_SERVERNAME users full control of the folder.
>And even added them to the Administrators group, but this has no
>effect.
>
>Can anyone suggest a cause to this not working as I'm all out of
>idea's.
>
>TIA,
>
>Colin

Colin,

I think you need to give your IWAM_ and IUSR_ accounts permissions on
the Oracle directories. See this KB article (point 10 ) :

HOWTO: Troubleshoot an ASP-to-Oracle Connectivity Problem
http://support.microsoft.com/?id=255084

Regards,

Paul Lynch
MCSE



Relevant Pages

  • Running a VBS file from IIS/ASP
    ... VBS file is a scheduled task and the Intranet page will allow users to ... Set oShell = Server.CreateObject ... NET SEND message ok, and I even get the event in Event Log, but the ...
    (microsoft.public.inetserver.iis)
  • WMI LocalSystem error/bug with Interactive User logged on.
    ... I am using a VBScript to query WMI and save a copy of the Security Event Log. ... I am running this through a Scheduled Task running as SYSTEM. ... Execute install.cmd to create a scheduled task which executes run.cmd. ... Verify the c:\security-log.evt was created on the test computer. ...
    (microsoft.public.windowsxp.security_admin)
  • Re: scheduled task dies
    ... "Jerold Schulman" wrote in message ... >>i've got a VBS file that runs a series of sql statements and sends email ... >>scheduled task is getting started, the sql statement runs, sends one ...
    (microsoft.public.win2000.advanced_server)
  • scheduled task dies
    ... i've got a VBS file that runs a series of sql statements and sends email to ... scheduled task is getting started, the sql statement runs, sends one email, ...
    (microsoft.public.win2000.advanced_server)
  • Scheduled NTBackup.exe Fails with Status Running
    ... and dropping no event log, scheduled task log or Backup log. ... Could someone explain how to backup mapped network drives in this scenario? ... The profile that usually remains logged in has several mapped network drives ...
    (microsoft.public.windows.server.general)