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>
Printer:<input type=text name=Printer>
<input type=button onclick='vbscript
:PrtProperties' value=Properties>
</body>
</html>
Tom Lavedas
===========