Wrap HTA into a single .exe?????

Discussion in 'HTML' started by rob.fahndrich@gmail.com, Aug 14, 2007.

  1. Guest


    > are there any freeware/open source tools available to "wrap" an HTA
    > and all associated files into a single .exe???
     
    , Aug 14, 2007
    #1
    1. Advertising

  2. Jim Moe Guest

    wrote:
    >> are there any freeware/open source tools available to "wrap" an HTA
    >> and all associated files into a single .exe???

    >

    What's a HTA?
    What do you mean by "wrap"?
    What use is an exe on the WWW?

    --
    jmm (hyphen) list (at) sohnen-moe (dot) com
    (Remove .AXSPAMGN for email)
     
    Jim Moe, Aug 14, 2007
    #2
    1. Advertising

  3. Jim Moe wrote:
    > wrote:
    >>> are there any freeware/open source tools available to "wrap" an HTA
    >>> and all associated files into a single .exe???

    > What's a HTA?


    HyperText Application. A Microsoft locally "executable" application that
    runs on top of IE and is written in an extended form of HTML.

    > What do you mean by "wrap"?
    > What use is an exe on the WWW?


    You're in alt.html at the moment. Discussion isn't restricted to the WWW
    as it is in comp.infosystems.www.*.
     
    Harlan Messinger, Aug 14, 2007
    #3
  4. Guest

    On Aug 14, 1:50 pm, Jim Moe <> wrote:
    > wrote:
    > >> are there any freeware/open source tools available to "wrap" an HTA
    > >> and all associated files into a single .exe???

    >
    > What's a HTA?
    > What do you mean by "wrap"?
    > What use is an exe on the WWW?
    >
    > --
    > jmm (hyphen) list (at) sohnen-moe (dot) com
    > (Remove .AXSPAMGN for email)


    HTA is HyperTextApplication
    you use html, javascript, vbscript to create applications

    example---


    <html>
    <head>
    <title>HTA Test</title>
    <HTA:APPLICATION
    ID = "oApp"
    APPLICATIONNAME = "TEST"
    BORDER = "normal"
    BORDERSTYLE = "normal"
    CAPTION = "no"
    ICON = "explorer.exe"
    SHOWINTASKBAR = "no"
    SINGLEINSTANCE = "yes"
    SYSMENU = "no"
    WINDOWSTATE = "normal"
    SCROLL = "no"
    SCROLLFLAT = "no"
    VERSION = "1.2"
    INNERBORDER = "yes"
    SELECTION = "no"
    MAXIMIZEBUTTON = "no"
    MINIMIZEBUTTON = "no"
    NAVIGABLE = "no"
    CONTEXTMENU = "no"
    >


    <style type="text/css">
    ..bluetext {font-family: Comic Sans MS; font-size: 10pt; color:
    blue;text-decoration: none;cursor: default;}
    ..redtext {font-family: Comic Sans MS; font-size: 10pt; color: red;text-
    decoration: none;cursor: default;}
    ..whitetext {font-family: Comic Sans MS; font-size: 10pt; color:
    white;text-decoration: none;cursor: hand;}
    </style>


    </head>

    <SCRIPT Language="VBScript">
    Sub Window_Onload


    CitrixPN.style.visibility="hidden"
    VisionAPP.style.visibility="hidden"

    strComputer = "."
    On Error Resume Next
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root
    \cimv2")
    Set colInstalledPrinters = objWMIService.ExecQuery _
    ("Select * from Win32_Printer")
    For Each objPrinter in colInstalledPrinters
    if (objPrinter.Attributes AND 4) = 4 then _
    DataArea.InnerHTML = "<p class='redtext'>" & objPrinter.Name & "</
    p>"
    Next

    Set objNet = CreateObject("WScript.NetWork")
    UserName.InnerHTML = "<p class='redtext'>" & objNet.UserName & "</
    p>"

    Set objNet = CreateObject("WScript.NetWork")
    ComputerName.InnerHTML = "<p class='redtext'>" & objNet.ComputerName
    & "</p>"

    set wsh = WScript.CreateObject ("WScript.Shell")
    Select Case LCase(objNet.UserName)

    Case "test"
    CitrixPN.style.visibility="visible"
    VisionAPP.style.visibility="visible"

    End Select

    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root
    \cimv2")

    Set colAdapters = objWMIService.ExecQuery _
    ("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled =
    True")

    n = 1

    For Each objAdapter in colAdapters
    If Not IsNull(objAdapter.IPAddress) Then
    For i = 0 To UBound(objAdapter.IPAddress)
    IPSpan.InnerHTML = "<p class='redtext'>" & objAdapter.IPAddress(i)
    & "</p>"
    Next
    End If

    n = n + 1

    Next

    End Sub
    </SCRIPT>

    <SCRIPT LANGUAGE="VBScript">
    Sub VisionAPPRDP
    On Error Resume Next
    set wshshell = CreateObject("WScript.Shell")
    wshshell.run """C:\Program Files\visionapp\visionapp Remote Desktop
    \vrd.lnk""", 1, FALSE
    End Sub

    Sub PrattPN
    On Error Resume Next
    set wshshell = CreateObject("WScript.Shell")
    wshshell.run "C:\Progra~1\Citrix\ICACli~1\pn.exe /PN:""PWCS Farm""",
    1, FALSE
    End Sub

    Sub ExitProgram
    window.close()
    End Sub

    </SCRIPT>

    <body topmargin="0" leftmargin="0" rightmargin="0" bgcolor="#C0C0C0">

    <div id="TimeHeader" align="center" style="background-color:blue">
    <table border="0" width="100%" class="blutest" height="10">
    <tr>
    <td align="center" width="100%">
    <script language="javascript">
    function det_time(){
    var d = new Date();
    var dstr = d.toLocaleString();
    document.getElementById('time').innerHTML = dstr;
    }
    </script>
    <div id="time" name="time" style="font-family:comic sans ms;font-
    size:11pt;color:white;font-weight:normal;text-align:CENTER;"><br></
    div>
    <script language="javascript">
    det_time();
    setInterval("det_time()", 1000);
    </script>
    </td>
    </tr>
    </table>
    </div>

    <div id="Header" align="center" style="background-color:yellow">
    <table border="0" width="100%" class="bluetext">
    <tr>
    <td align="right" width="56%">
    Current Default Printer is:
    </td>
    <td align="left" width="44%">
    <span id = "DataArea"></span>
    </td>
    </tr>
    <tr>
    <td align="right" width="56%">
    Current Username is:
    </td>
    <td align="left" width="44%">
    <span id = "UserName"></span>
    </td>
    </tr>
    <tr>
    <td align="right" width="56%">
    Current Computer Name is:
    </td>
    <td align="left" width="44%">
    <span id = "ComputerName"></span>
    </td>
    </tr>
    <tr>
    <td align="right" width="56%">
    Current IP Address is:
    </td>
    <td align="left" width="44%">
    <span id = "IPSpan"></span>
    </td>
    </tr>
    </table>
    </div>

    <div id="TimeFooter" align="center" style="background-color:blue">
    <table border="0" width="100%" class="blutest">
    <tr>
    <td align="center" width="100%" height="10">
    </td>
    </tr>
    </table>
    </div>
    <br>

    <div id="buttons" align="center">
    <button style="background-color:blue" class="whitetext"
    name="CitrixPN" onclick="PrattPN" style="width: 258; height:
    26">Citrix Program Neighborhood</button><p>
    <button style="background-color:blue" class="whitetext"
    name="VisionAPP" onclick="VisionAPPRDP" style="width: 258; height:
    26">VisionAPP RDP</button><p>
    <button style="background-color:blue" class="whitetext"
    name="CloseWindow" onclick="ExitProgram" style="width: 258; height:
    26" >Close</button><p>
    <br>
    </div>

    </body>
    </html>

    <script language="vbscript">
    'Option Explicit
    PositionWindow()
    Sub PositionWindow()
    Dim WindowWidth, WindowHeight, LeftPos, TopPos
    WindowWidth = 375
    WindowHeight = 500
    LeftPos = (screen.availWidth - WindowWidth) / 2
    TopPos = (screen.availHeight - WindowHeight) / 2
    window.resizeTo WindowWidth, WindowHeight
    window.moveTo LeftPos, TopPos
    End Sub
    </script>

    <script type="text/javascript">
    function startProg(myPath)
    {
    var WshShell = new ActiveXObject("wscript.shell");
    WshShell.Run("\""+myPath);
    }
    </script>


    --------------------------------------------------------------------------------------------------------------------------------------


    save this code with an extension of .hta
    when you launch it the MSHTA.EXE will run it as an application.

    when I say WRAP up in an .exe i would like to take my .hta file and
    any images (icons, logos, graphics, etc..) and create a single .exe
    file to launch the hta.
    I have seen an application called HTMLAPP that does this but it is not
    very intuitive and is not free.
     
    , Aug 14, 2007
    #4
  5. Jim Moe Guest

    wrote:
    >
    > save this code with an extension of .hta
    > when you launch it the MSHTA.EXE will run it as an application.
    >

    Hmm. Is this safe? It would seem a variety of unfortunate code could be
    added to such a file since it runs as an application. It sounds a bit like
    the option Outlook offered to run executables that made it such a disaster.

    --
    jmm (hyphen) list (at) sohnen-moe (dot) com
    (Remove .AXSPAMGN for email)
     
    Jim Moe, Aug 15, 2007
    #5
  6. Guest

    On Aug 15, 12:57 pm, Jim Moe <> wrote:
    > wrote:
    >
    > > save this code with an extension of .hta
    > > when you launch it the MSHTA.EXE will run it as an application.

    >
    > Hmm. Is this safe? It would seem a variety of unfortunate code could be
    > added to such a file since it runs as an application. It sounds a bit like
    > the option Outlook offered to run executables that made it such a disaster.
    >
    > --
    > jmm (hyphen) list (at) sohnen-moe (dot) com
    > (Remove .AXSPAMGN for email)


    this is used for useful applications. I would not execute an
    application unless i knew what it was for or what it was doing, same
    with an HTA.
    but because an HTA is like HTML any images (icons, logos, etc) are
    seperate files is why i would like to wrap them into a single .exe
    file
     
    , Aug 15, 2007
    #6
  7. Harlan Messinger wrote:
    > Jim Moe wrote:
    >> wrote:
    >>>> are there any freeware/open source tools available to "wrap" an HTA
    >>>> and all associated files into a single .exe???

    >> What's a HTA?

    >
    > HyperText Application. A Microsoft locally "executable" application that
    > runs on top of IE and is written in an extended form of HTML.


    I just discovered a common example. When you log into a Windows server
    for the first time and it sets up a profile for you, it then launches a
    "Manage Your Server" panel. This is an HTA application.
     
    Harlan Messinger, Aug 16, 2007
    #7
  8. wrote:
    > On Aug 15, 12:57 pm, Jim Moe <> wrote:
    >> wrote:
    >>
    >>> save this code with an extension of .hta
    >>> when you launch it the MSHTA.EXE will run it as an application.

    >> Hmm. Is this safe? It would seem a variety of unfortunate code could be
    >> added to such a file since it runs as an application. It sounds a bit like
    >> the option Outlook offered to run executables that made it such a disaster.
    >>
    >> --
    >> jmm (hyphen) list (at) sohnen-moe (dot) com
    >> (Remove .AXSPAMGN for email)

    >
    > this is used for useful applications. I would not execute an
    > application unless i knew what it was for or what it was doing, same
    > with an HTA.
    > but because an HTA is like HTML any images (icons, logos, etc) are
    > seperate files is why i would like to wrap them into a single .exe
    > file
    >


    This to MS crap, i.e., Windows only--MSIE only. Has nothing to do with
    HTML and WWW. Try one of the MS newsgroups. Looks lake wat you need is
    not HTA but to compile a app, VB maybe?

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Aug 16, 2007
    #8
  9. "Jonathan N. Little" <> writes:

    > This to MS crap, i.e., Windows only--MSIE only. Has nothing to do with
    > HTML and WWW.


    HTA is an HTML variant, and alt.html isn't chartered as WWW-only. I don't
    find it interesting or relevant to what I do with HTML, but it's on-topic
    in alt.html.

    I wouldn't discuss it in comp.infosystems.www.authoring.html though, because
    that specific group's charter is stricter, and the whole comp.* hierarchy of
    groups is generally stricter about topicality than the alt.* groups.

    sherm--

    --
    Web Hosting by West Virginians, for West Virginians: http://wv-www.net
    Cocoa programming in Perl: http://camelbones.sourceforge.net
     
    Sherm Pendley, Aug 16, 2007
    #9
  10. Sherm Pendley wrote:
    > "Jonathan N. Little" <> writes:
    >
    >> This to MS crap, i.e., Windows only--MSIE only. Has nothing to do with
    >> HTML and WWW.

    >
    > HTA is an HTML variant, and alt.html isn't chartered as WWW-only. I don't
    > find it interesting or relevant to what I do with HTML, but it's on-topic
    > in alt.html.


    I suppose because an html document but relies on "jscript" to be an HTA
    so would you not say this would be better suited for a Microsoft group
    and a scripting one at that?


    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Aug 16, 2007
    #10
  11. "Jonathan N. Little" <> writes:

    > Sherm Pendley wrote:
    >> "Jonathan N. Little" <> writes:
    >>
    >>> This to MS crap, i.e., Windows only--MSIE only. Has nothing to do with
    >>> HTML and WWW.

    >>
    >> HTA is an HTML variant, and alt.html isn't chartered as WWW-only. I don't
    >> find it interesting or relevant to what I do with HTML, but it's on-topic
    >> in alt.html.

    >
    > I suppose because an html document but relies on "jscript" to be an
    > HTA so would you not say this would be better suited for a Microsoft
    > group and a scripting one at that?


    I didn't say this was the *best* group for it. I disagreed with your assertion
    that it was off-topic here.

    sherm--

    --
    Web Hosting by West Virginians, for West Virginians: http://wv-www.net
    Cocoa programming in Perl: http://camelbones.sourceforge.net
     
    Sherm Pendley, Aug 16, 2007
    #11
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Aaron Fude

    To wrap or not to wrap?

    Aaron Fude, May 8, 2008, in forum: Java
    Replies:
    12
    Views:
    741
    Chronic Philharmonic
    May 10, 2008
  2. Art Werschulz

    Text::Wrap::wrap difference

    Art Werschulz, Sep 22, 2003, in forum: Perl Misc
    Replies:
    0
    Views:
    274
    Art Werschulz
    Sep 22, 2003
  3. Art Werschulz

    Text::Wrap::wrap difference

    Art Werschulz, Sep 24, 2003, in forum: Perl Misc
    Replies:
    1
    Views:
    280
    Anno Siegel
    Sep 25, 2003
  4. ela
    Replies:
    12
    Views:
    381
    Uri Guttman
    Apr 6, 2009
  5. Wrap HTA into .exe

    , Aug 13, 2007, in forum: Javascript
    Replies:
    1
    Views:
    89
    Thomas 'PointedEars' Lahn
    Aug 13, 2007
Loading...

Share This Page