Running WSH Script From ASP 
Author Message
 Running WSH Script From ASP

Can anyone help, i wish to run a WSH script and pass a paramter to it from
within an ASP file from a button 'on-click' event.

Cheers



Tue, 24 Sep 2002 03:00:00 GMT  
 Running WSH Script From ASP
Only if you create an instance of the WScript.Shell object to use the Run method...

To use the Shell object or any other "unsafe" ActiveX control in the browser, *every* user has to
customize the relevant security zone to change the

"Initialize and script ActiveX controls not marked as safe"

option from Disable to Prompt or Enable.  For the Intranet zone that might be an acceptable thing to
do, but it's still the end user's choice.

You could avoid the security issues with an HTA (HTML Application)...

--
Michael Harris
MVP Scripting

Can anyone help, i wish to run a WSH script and pass a paramter to it from
within an ASP file from a button 'on-click' event.

Cheers



Tue, 24 Sep 2002 03:00:00 GMT  
 Running WSH Script From ASP
Excuse my ignorance but (other than the securtiy options) can you give me an
example of running the script from an ASP event?

Many Thanks

Alan Gray


Quote:
>Only if you create an instance of the WScript.Shell object to use the Run
method...

>To use the Shell object or any other "unsafe" ActiveX control in the

browser, *every* user has to
Quote:
>customize the relevant security zone to change the

>"Initialize and script ActiveX controls not marked as safe"

>option from Disable to Prompt or Enable.  For the Intranet zone that might

be an acceptable thing to
Quote:
>do, but it's still the end user's choice.

>You could avoid the security issues with an HTA (HTML Application)...

>--
>Michael Harris
>MVP Scripting




Quote:
>Can anyone help, i wish to run a WSH script and pass a paramter to it from
>within an ASP file from a button 'on-click' event.

>Cheers



Thu, 26 Sep 2002 03:00:00 GMT  
 Running WSH Script From ASP
set shell = createobject("wscript.shell")
shell.run "foobar.vbs " & arg1 & " " & arg2

--
Michael Harris
MVP Scripting

Excuse my ignorance but (other than the securtiy options) can you give me an
example of running the script from an ASP event?

Many Thanks

Alan Gray


Quote:
>Only if you create an instance of the WScript.Shell object to use the Run
method...

>To use the Shell object or any other "unsafe" ActiveX control in the

browser, *every* user has to
Quote:
>customize the relevant security zone to change the

>"Initialize and script ActiveX controls not marked as safe"

>option from Disable to Prompt or Enable.  For the Intranet zone that might

be an acceptable thing to
Quote:
>do, but it's still the end user's choice.

>You could avoid the security issues with an HTA (HTML Application)...

>--
>Michael Harris
>MVP Scripting




Quote:
>Can anyone help, i wish to run a WSH script and pass a paramter to it from
>within an ASP file from a button 'on-click' event.

>Cheers



Thu, 26 Sep 2002 03:00:00 GMT  
 Running WSH Script From ASP


Fri, 19 Jun 1992 00:00:00 GMT  
 Running WSH Script From ASP
Hi Mike

I am trying yo run WSH scripts from a browser (IE4)NT workstation with
the host 5.1 installed on an intranet. I have set all the security
options as mentioned.. However..

When i simply write a piece of client side VBScript to initialise a
shell ie

set myshell = createobject= ("wscript.shell")

i get an error:

Error: Object doesn't support this property or method.

Is it the way I have installed WSH or something?

Thanks

Quote:
-----Original Message-----

Posted At: 07 April 2000 19:59
Posted To: wsh
Conversation: Running WSH Script From ASP
Subject: Re: Running WSH Script From ASP

Only if you create an instance of the WScript.Shell object to use the
Run method...

To use the Shell object or any other "unsafe" ActiveX control in the
browser, *every* user has to
customize the relevant security zone to change the

"Initialize and script ActiveX controls not marked as safe"

option from Disable to Prompt or Enable.  For the Intranet zone that
might be an acceptable thing to
do, but it's still the end user's choice.

You could avoid the security issues with an HTA (HTML Application)...

--
Michael Harris
MVP Scripting



Can anyone help, i wish to run a WSH script and pass a paramter to it
from
within an ASP file from a button 'on-click' event.

Cheers



Fri, 27 Sep 2002 03:00:00 GMT  
 Running WSH Script From ASP
"...with the host 5.1 installed on an intranet..."

I'm not sure what you mean by the above, but Window Script 5.1 needs to be installed on the client.

--
Michael Harris
MVP Scripting


Hi Mike

I am trying yo run WSH scripts from a browser (IE4)NT workstation with
the host 5.1 installed on an intranet. I have set all the security
options as mentioned.. However..

When i simply write a piece of client side vbscript to initialise a
shell ie

set myshell = createobject= ("wscript.shell")

i get an error:

Error: Object doesn't support this property or method.

Is it the way I have installed WSH or something?

Thanks

Quote:
-----Original Message-----

Posted At: 07 April 2000 19:59
Posted To: wsh
Conversation: Running WSH Script From ASP
Subject: Re: Running WSH Script From ASP

Only if you create an instance of the WScript.Shell object to use the
Run method...

To use the Shell object or any other "unsafe" ActiveX control in the
browser, *every* user has to
customize the relevant security zone to change the

"Initialize and script ActiveX controls not marked as safe"

option from Disable to Prompt or Enable.  For the Intranet zone that
might be an acceptable thing to
do, but it's still the end user's choice.

You could avoid the security issues with an HTA (HTML Application)...

--
Michael Harris
MVP Scripting



Can anyone help, i wish to run a WSH script and pass a paramter to it
from
within an ASP file from a button 'on-click' event.

Cheers



Fri, 27 Sep 2002 03:00:00 GMT  
 Running WSH Script From ASP
Assuming that the extra equal sign is a typo, and you mean:

set myshell = createobject("wscript.shell")

not:

set myshell = createobject = ("wscript.shell")

I would guess you have browser security set to "high", and get no activeX warning, just a failure. The second error, that you do see is caused by the first one, failing to create the object at all.

I think your best solution is to rename all the HTM files to the HTA extension, and run on IE5. Failing that, setting down security is the only way I know to create an object on a browser page. It is IE expected behavior.

--
Mark L. Ferguson       Please reply in Newsgroup
marfers notes for OE 5.0  >  http://www.geocities.com/SiliconValley/Bay/6386/IE_ng_notes.htm

Quote:

> Hi Mike

> I am trying yo run WSH scripts from a browser (IE4)NT workstation with
> the host 5.1 installed on an intranet. I have set all the security
> options as mentioned.. However..

> When i simply write a piece of client side vbscript to initialise a
> shell ie

> set myshell = createobject= ("wscript.shell")

> i get an error:

> Error: Object doesn't support this property or method.

> Is it the way I have installed WSH or something?

> Thanks

> -----Original Message-----

> Posted At: 07 April 2000 19:59
> Posted To: wsh
> Conversation: Running WSH Script From ASP
> Subject: Re: Running WSH Script From ASP

> Only if you create an instance of the WScript.Shell object to use the
> Run method...

> To use the Shell object or any other "unsafe" ActiveX control in the
> browser, *every* user has to
> customize the relevant security zone to change the

> "Initialize and script ActiveX controls not marked as safe"

> option from Disable to Prompt or Enable.  For the Intranet zone that
> might be an acceptable thing to
> do, but it's still the end user's choice.

> You could avoid the security issues with an HTA (HTML Application)...

> --
> Michael Harris
> MVP Scripting



> Can anyone help, i wish to run a WSH script and pass a paramter to it
> from
> within an ASP file from a button 'on-click' event.

> Cheers



Fri, 27 Sep 2002 03:00:00 GMT  
 Running WSH Script From ASP


Fri, 19 Jun 1992 00:00:00 GMT  
 Running WSH Script From ASP
Hello,

Sorry about the typo, yes Mark script was as you expected

Mike, I did mean 5.1 installed on all client machines that were not 98
or 2000.

so will IE5 security not apply to .hta  files or have I read that wrong?

I tried again last night aand it worked! although I can find no reason
why it didn't before, just running client side vbscript in an asp page.

Anyway, It works now, I can use the company intranet to give users a
control panel to change their proxy settings, drive mappings etc etc!

Fantastic, thanks for your help

Quote:
-----Original Message-----

Posted At: 10 April 2000 16:31
Posted To: wsh
Conversation: Running WSH Script From ASP
Subject: Re: Run time error

"...with the host 5.1 installed on an intranet..."

I'm not sure what you mean by the above, but Window Script 5.1 needs to
be installed on the client.

--
Michael Harris
MVP Scripting



Hi Mike

I am trying yo run WSH scripts from a browser (IE4)NT workstation with
the host 5.1 installed on an intranet. I have set all the security
options as mentioned.. However..

When i simply write a piece of client side vbscript to initialise a
shell ie

set myshell = createobject= ("wscript.shell")

i get an error:

Error: Object doesn't support this property or method.

Is it the way I have installed WSH or something?

Thanks

-----Original Message-----

Posted At: 07 April 2000 19:59
Posted To: wsh
Conversation: Running WSH Script From ASP
Subject: Re: Running WSH Script From ASP

Only if you create an instance of the WScript.Shell object to use the
Run method...

To use the Shell object or any other "unsafe" ActiveX control in the
browser, *every* user has to
customize the relevant security zone to change the

"Initialize and script ActiveX controls not marked as safe"

option from Disable to Prompt or Enable.  For the Intranet zone that
might be an acceptable thing to
do, but it's still the end user's choice.

You could avoid the security issues with an HTA (HTML Application)...

--
Michael Harris
MVP Scripting



Can anyone help, i wish to run a WSH script and pass a paramter to it
from
within an ASP file from a button 'on-click' event.

Cheers



Sat, 28 Sep 2002 03:00:00 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. Running WSH script from ASP page - problem

2. Running WSH from ASP

3. how can i run an asp with WSH?

4. Running a WSH vbs from ASP

5. Running programs on the server through ASP/WSH

6. Run an ASP page with WSH ?

7. WSH Shell.Run and ASP

8. Unable to run Wsh from Asp page

9. Running WSH from ASP Page - at command

10. Problem Running WSH from ASP Page

11. remote Authentication for running a remote wsh script

12. How to stop a running WSH script

 

 
Powered by phpBB® Forum Software