Windows Vista Forums

Embedded HTA

  1. #1


    David Bray Guest

    Embedded HTA

    To give VBSCript an Interface you use an hta

    Using CreateObject (in Visual Basic for instance) is it possible to
    embed a HTA - like you can with a Webbrowser Object - or is HTA not the
    way to do this



    I want to script on the machine from within an application with a web
    browser like rendering (and maintain control of the object)

      My System SpecsSystem Spec

  2. #2


    mayayana Guest

    Re: Embedded HTA

    By "maintain control" you mean that the code
    is not accessible/editable by the people using
    your tool? Then why not just use VB? A webpage
    can only render a poor facsimile of the GUI options
    you can get in compiled software.

    If you really need to present a webpage for some
    reason, you probably can't entirely hide the source
    code. You could maybe do something like save the
    webpage as a resource in your EXE, write it to the
    TEMP folder at startup, then open it in your WB control
    and delete the file in TEMP.

    Either way, an HTA is almost identical to a webpage.
    It IS a webpage, in an IE browser window (which is the
    same as a WB control), but in the case of an HTA the
    browser window is wrapped and managed by mshta.exe.
    So an HTA is not something you can create. It's just
    the functionality of mshta.exe. The main difference between
    hta and html is just that an HTA has no security other than
    the requirement that it be local. It may be possible to use a
    WB in VB and bypass all security by doing whatever mshta.exe
    does, but I don't know of any documentation about that.


    > To give VBSCript an Interface you use an hta
    >
    > Using CreateObject (in Visual Basic for instance) is it possible to
    > embed a HTA - like you can with a Webbrowser Object - or is HTA not the
    > way to do this
    >
    > I want to script on the machine from within an application with a web
    > browser like rendering (and maintain control of the object)


      My System SpecsSystem Spec

  3. #3


    mr_unreliable Guest

    Re: Embedded HTA

    David Bray wrote:

    > I want to script on the machine from within an application with a web
    > browser like rendering (and maintain control of the object)
    hi David,

    Microsoft also offers the "Microsoft Script Control" --
    which may be found on the ms scripting website. Er wait,
    it is now called the: "Windows Script Control".

    The Script Control is intended to be embedded in some
    other app (like a vb app), and allow for scripting
    INSIDE the app.

    It is generally used in situations where the app
    provides the basic framework (business or engineering
    model), but where the user needs to provide input of
    a sort that goes beyond simply entering numbers,
    (e.g., entering equations or supplemental logic).

    If interested, you can find the script control here:

    http://www.microsoft.com/downloads/d...displaylang=en

    cheers, jw
    ____________________________________________________________

    You got questions? WE GOT ANSWERS!!! ..(but,
    no guarantee the answers will be applicable to the questions)

      My System SpecsSystem Spec

  4. #4


    David Bray Guest

    Re: Embedded HTA

    Thanks Mayayana

    It's the last minute scripting I want access to, but I need the interface.

    This is mainly a custom reporting function - I can/do write
    hta where I am on site and need a report
    I script a quick report and link it to the menu system of the app
    - but the app looses control over it from an interface point of
    view - I'd like a bit of modality

    security is not an issue - I don't care about the source etc being
    visible - Internet explorer doesn't allow access to the file system (of
    course) - the HTA's are perfect programatically, but they don't fit
    aesthetically

    mayayana wrote:

    > By "maintain control" you mean that the code
    > is not accessible/editable by the people using
    > your tool? Then why not just use VB? A webpage
    > can only render a poor facsimile of the GUI options
    > you can get in compiled software.
    >
    > If you really need to present a webpage for some
    > reason, you probably can't entirely hide the source
    > code. You could maybe do something like save the
    > webpage as a resource in your EXE, write it to the
    > TEMP folder at startup, then open it in your WB control
    > and delete the file in TEMP.
    >
    > Either way, an HTA is almost identical to a webpage.
    > It IS a webpage, in an IE browser window (which is the
    > same as a WB control), but in the case of an HTA the
    > browser window is wrapped and managed by mshta.exe.
    > So an HTA is not something you can create. It's just
    > the functionality of mshta.exe. The main difference between
    > hta and html is just that an HTA has no security other than
    > the requirement that it be local. It may be possible to use a
    > WB in VB and bypass all security by doing whatever mshta.exe
    > does, but I don't know of any documentation about that.
    >
    >

    >> To give VBSCript an Interface you use an hta
    >>
    >> Using CreateObject (in Visual Basic for instance) is it possible to
    >> embed a HTA - like you can with a Webbrowser Object - or is HTA not the
    >> way to do this
    >>
    >> I want to script on the machine from within an application with a web
    >> browser like rendering (and maintain control of the object)
    >
    >

      My System SpecsSystem Spec

  5. #5


    mayayana Guest

    Re: Embedded HTA

    I'm not sure I really understand what you need, but
    it sounds like an ActiveX DLL or EXE might be the
    thing. You could script an ActiveX EXE, have events,
    etc. But it might be a lot of work to build the GUI
    and to write the COM methods you'd need.

    > Thanks Mayayana
    >
    > It's the last minute scripting I want access to, but I need the interface.
    >
    > This is mainly a custom reporting function - I can/do write
    > hta where I am on site and need a report
    > I script a quick report and link it to the menu system of the app
    > - but the app looses control over it from an interface point of
    > view - I'd like a bit of modality
    >
    > security is not an issue - I don't care about the source etc being
    > visible - Internet explorer doesn't allow access to the file system (of
    > course) - the HTA's are perfect programatically, but they don't fit
    > aesthetically
    >
    > mayayana wrote:

    > > By "maintain control" you mean that the code
    > > is not accessible/editable by the people using
    > > your tool? Then why not just use VB? A webpage
    > > can only render a poor facsimile of the GUI options
    > > you can get in compiled software.
    > >
    > > If you really need to present a webpage for some
    > > reason, you probably can't entirely hide the source
    > > code. You could maybe do something like save the
    > > webpage as a resource in your EXE, write it to the
    > > TEMP folder at startup, then open it in your WB control
    > > and delete the file in TEMP.
    > >
    > > Either way, an HTA is almost identical to a webpage.
    > > It IS a webpage, in an IE browser window (which is the
    > > same as a WB control), but in the case of an HTA the
    > > browser window is wrapped and managed by mshta.exe.
    > > So an HTA is not something you can create. It's just
    > > the functionality of mshta.exe. The main difference between
    > > hta and html is just that an HTA has no security other than
    > > the requirement that it be local. It may be possible to use a
    > > WB in VB and bypass all security by doing whatever mshta.exe
    > > does, but I don't know of any documentation about that.
    > >
    > >

    > >> To give VBSCript an Interface you use an hta
    > >>
    > >> Using CreateObject (in Visual Basic for instance) is it possible to
    > >> embed a HTA - like you can with a Webbrowser Object - or is HTA not the
    > >> way to do this
    > >>
    > >> I want to script on the machine from within an application with a web
    > >> browser like rendering (and maintain control of the object)
    > >
    > >


      My System SpecsSystem Spec

  6. #6


    Sa6ry Guest

    Re: Embedded HTA

    check out this tool

    www.vbs2exe.com

    write your logic using vbscript and win32 api .. and your GUI using html ..

    Regards,

    XNeat
    www.xneat.com\



      My System SpecsSystem Spec

Embedded HTA

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get WMI embedded array? Ant PowerShell 2 06 Nov 2009
Embedded photos exeman Vista mail 8 25 Jun 2008
Some tags not being embedded (WPG). intclass Vista music pictures video 1 09 Apr 2008
Embedded swf does not execute Ralph W Vista mail 1 11 Jun 2007
Color of WMP Embedded Muffin Vista music pictures video 0 22 Feb 2007