1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need help in calling vbscript from html file

Discussion in 'Visual Basic ( VB )' started by user1, Feb 21, 2008.

  1. user1

    user1 New Member

    Joined:
    Feb 21, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    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:
    <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>
     
    Last edited by a moderator: Feb 22, 2008
  2. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,646
    Likes Received:
    86
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    It's probably because of Internet Explorer's sceurity settings, try lowering the security from Internet Options.
     

Share This Page