Windows Vista Forums

How to open an external file out of an HTA
  1. #1


    Jan Guest

    How to open an external file out of an HTA

    Hi everybody,



    I have an HTA wich queries printer informations from the active
    directory.
    The output is also in the HTA.
    By clicking the printer name, the property window of the printer
    should open.
    The command is "rundll32 printui.dll,PrintUIEntry /p /n \\server
    \printer"

    How can I put this command in a href?

    I tryed
    strHTML & "<td><a href='file://rundll32 printui.dll,PrintUIEntry /p /n
    \\" & sn & "\" & pn & "'>"& pn & "</td>"

    Thanks

    Regards Jan

      My System SpecsSystem Spec

  2. #2


    Tom Lavedas Guest

    Re: How to open an external file out of an HTA

    On Aug 15, 5:21*am, Jan <m...@xxxxxx> wrote:

    > Hi everybody,
    >
    > I have an HTA wich queries printer informations from the active
    > directory.
    > The output is also in the HTA.
    > By clicking the printer name, the property window of the printer
    > should open.
    > The command is "rundll32 printui.dll,PrintUIEntry /p /n *\\server
    > \printer"
    >
    > How can I put this command in a href?
    >
    > I tryed
    > strHTML & "<td><a href='file://rundll32 printui.dll,PrintUIEntry /p /n
    > \\" & sn & "\" & pn & "'>"& pn & "</td>"
    >
    > Thanks
    >
    > Regards Jan
    This is the way I would do it ...

    <html>
    <head>
    <script language=vbs>

    sub PrtProperties
    sn = Machine.value
    pn = Printer.value
    sCmd = "rundll32 printui.dll,PrintUIEntry /p /n \\" & sn & "\" & pn
    with createobject("wscript.shell")
    .run sCmd, 1, false
    end with
    end sub

    </script>
    <body>
    Machine:<input type=text name=Machine> &nbsp;
    Printer:<input type=text name=Printer> &nbsp;
    <input type=button onclick='vbscript:PrtProperties' value=Properties>
    </body>
    </html>

    Tom Lavedas
    ===========

      My System SpecsSystem Spec

How to open an external file out of an HTA problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vista /XP Networking:can't open external drives tottieon Vista networking & sharing 1 03 Sep 2009
in vb.net how to open a file from file download prompt without askinguser to save it or run it....just open it in internet explorer Kaustubh Budukh .NET General 4 23 Jun 2008
urgent help. Cant open files on external disk lobo Vista security 6 11 Feb 2008
can open external disk Martin Vista hardware & devices 0 24 Oct 2007
WMP won't open songs on external HDD easybee Vista music pictures video 0 16 Oct 2007