Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: WScript Error


Message #1 by "Kevin Quigley" <kevinq@j...> on Thu, 21 Nov 2002 14:32:09
Hi,
I am trying to run an exe file from my ASP page but I am getting an error 
message at when I try to create a WScript.Shell object.

The code that is giving me problems is:


        Dim WSHShell
	
	Set WshShell = WScript.CreateObject("WScript.Shell")
	intReturn = WshShell.Run("notepad " & WScript.ScriptFullName, 1, 
TRUE)
	WshShell.Popup "Notepad is now closed." 

Im getting an object required error message.

I.ve looked at some of the other post ie: just using CreateObject but the 
other methods don't open the application.

I am using visual interdev.

Thanks
Message #2 by Greg Griffiths <greg2@s...> on Thu, 21 Nov 2002 22:05:18 +0000
There are some WSH resources at 
http://www.greggriffiths.org/webdev/wsh/examples.html

At 14:32 21/11/02 +0000, you wrote:
>Hi,
>I am trying to run an exe file from my ASP page but I am getting an error
>message at when I try to create a WScript.Shell object.
>
>The code that is giving me problems is:
>
>
>         Dim WSHShell
>
>         Set WshShell = WScript.CreateObject("WScript.Shell")
>         intReturn = WshShell.Run("notepad " & WScript.ScriptFullName, 1,
>TRUE)
>         WshShell.Popup "Notepad is now closed."
>
>Im getting an object required error message.
>
>I.ve looked at some of the other post ie: just using CreateObject but the
>other methods don't open the application.
>
>I am using visual interdev.
>
>Thanks



Message #3 by "Ken Schaefer" <ken@a...> on Mon, 25 Nov 2002 15:11:56 +1100
Set WSHShell = Server.CreateObject("WScript.Shell")

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Kevin Quigley" <kevinq@j...>
Subject: [asp_web_howto] WScript Error


: I am trying to run an exe file from my ASP page but I am getting an error
: message at when I try to create a WScript.Shell object.
:
: The code that is giving me problems is:
:
:
:         Dim WSHShell
:
: Set WshShell = WScript.CreateObject("WScript.Shell")
: intReturn = WshShell.Run("notepad " & WScript.ScriptFullName, 1,
: TRUE)
: WshShell.Popup "Notepad is now closed."
:
: Im getting an object required error message.
:
: I.ve looked at some of the other post ie: just using CreateObject but the
: other methods don't open the application.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


  Return to Index