All what I am trying to do is to process a vbscript in the backgroud
while my ASP page returns to the user. This works fine when I run a
batch file. (.vbs) did not work for some reason that I am trying to
know.

I can use some windows instrumentation code to do so but the only
advantage I found in the WSH is that it does not wait for the script tp
return provided that you used:

Set shell=Server.CreateObject("WScript.Shell")

call shell.run("c:\directory1\myscript.vbs",1,false)  ' --> false forces
the myscript.vbs to work in background process while asp returns to
user.

nabil



-----Original Message-----
From: Chris Tifer [mailto:[EMAIL PROTECTED]] 
Sent: Monday, October 14, 2002 4:04 PM
To: ActiveServerPages
Subject: Re: vbscript run commandline problem

.vbs files are run in a different context when run through
the browser, right?  Are you assuming the same action
would be taken as if you were using the Windows Scripting Host?

Chris Tifer
> Set shell=Server.CreateObject("WScript.Shell")
>
> 'the following does not fail but does not perform the task
> call shell.run("c:\directory1\myscript.vbs",1,true)
----- Original Message -----
From: "nabil" <[EMAIL PROTECTED]>
To: "ActiveServerPages" <[EMAIL PROTECTED]>
Sent: Monday, October 14, 2002 9:48 AM
Subject: vbscript run commandline problem


> Hi,
>
> I was trying to run a vbscript from ASP page. Knowing that the ASP
page
> have administrative permissions.
>
> .bat  files are running correctly, but the .vbs fails to show the
result
>
> no error messages are returned to screen!!!
>
> Code used:
>
> Dim shell
> Set shell=Server.CreateObject("WScript.Shell")
>
> 'the following does not fail but does not perform the task
> call shell.run("c:\directory1\myscript.vbs",1,true)
>
> 'the following command works perfect
> call shell.run("c:\directory1\myscript2.bat,1,true)
>
>
>
> set shell=nothing
>
> any suggestions
>
>
> ---
> You are currently subscribed to activeserverpages as:
[EMAIL PROTECTED]
> To unsubscribe send a blank email to
%%email.unsub%%


---
You are currently subscribed to activeserverpages as:
[EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%


---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to