Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - How to open an external file out of an HTA

Reply
 
Old 08-15-2008   #1 (permalink)
Jan


 
 

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
Old 08-15-2008   #2 (permalink)
Tom Lavedas


 
 

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

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

> 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
Reply

Thread Tools


Similar Threads
Thread Forum
Vista /XP Networking:can't open external drives Vista networking & sharing
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 .NET General
urgent help. Cant open files on external disk Vista security
can open external disk Vista hardware & devices
WMP won't open songs on external HDD Vista music pictures video


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46