Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Visual Basic ( VB ) (http://www.go4expert.com/forums/visual-basic/)
-   -   Need help in calling vbscript from html file (http://www.go4expert.com/forums/help-calling-vbscript-html-file-t8980/)

user1 22Feb2008 02:19

Need help in calling vbscript from html file
 
I want to call a vbscript file from html. I am using the below code.

I get the error 'ActiveX Component doesn't create an object 'WScript.Shell'

Please help me with this
HTML Code:

<HTML>

<HEAD><TITLE>Run CR Scripts</TITLE>

<SCRIPT LANGUAGE="VBScript">


Sub Button1_OnClick

Dim WSHell
Set WSHell = Server.CreateObject("Wscript.Shell")
env = "PROD_57"

WSHell.Run """\\k:\data\CR.vbs """ & env
set WSHell = Nothing
End Sub



</SCRIPT>

</HEAD>

<BODY>

<H3>Run CR Scripts</H3><HR>

<FORM><INPUT NAME="Button1" TYPE="BUTTON" VALUE="Click Here"></FORM>

</BODY>

</HTML>


pradeep 22Feb2008 10:18

Re: Need help in calling vbscript from html file
 
It's probably because of Internet Explorer's sceurity settings, try lowering the security from Internet Options.


All times are GMT +5.5. The time now is 04:52.