Create new website

Discussion in 'Scripting' started by Baur, May 25, 2005.

  1. Baur

    Baur Guest

    I've found a scrip in the homepage, but i doesn't work probertly on my server..
    I'll hope you can help..
    I got this error:
    error '80041003'
    /page/prove.asp, line 3
    And the script is:
    strComputer = "."
    Set objWMIService = GetObject _
    ("winmgmts:{authenticationLevel=pktPrivacy}\\" _
    & strComputer & "\root\microsoftiisv2")

    Set objWebService = objWMIService.ExecQuery _
    ("Select * From IISWebService")

    arrBindings = Array(0)
    Set arrBindings(0) = _
    arrBindings(0).IP = ""
    arrBindings(0).Port = "8383"
    arrBindings(0).Hostname = "atl-ws-01"

    For Each objItem in objWebService
    objItem.CreateNewSite "Test Site", arrBindings, _

    Baur, May 25, 2005
    1. Advertisements

  2. Baur

    AustinJames Guest

    Did you try giving the webpage an .hta extension? This script won't run in a
    basic HTML file. The HTA extension will allow the script to be run...

    AustinJames, May 25, 2005
    1. Advertisements

  3. Baur

    Baur Guest

    No i haven't but how do you do that ?...

    Baur, Jul 6, 2005
  4. Just rename the file containing the html code such that its extension is
    ..HTA instead of .HTM or .HTML.

    Al Dunbar [MS-MVP], Jul 6, 2005
  5. Baur

    Baur Guest

    But then i'm going on the index.hta the browser will download the file, shall
    i not do something in the iis ?...
    Baur, Jul 8, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.