This is what I have so far, with google help. I don't know VBscript sadly...
CODE
<html>
<head>
</head>
<p><font face="Verdana">Printer connection...</font></p>
<script LANGUAGE="VBScript">
<!--
on error resume next
Set WshNetwork = CreateObject("WScript.Network")
PrinterPath = "\\Server\Printer"
msg="Do you want " & PrinterPath & " to be Default printer?"
answ=msgbox(msg,vbYesNoCancel,"Add Printer")
If answ=vbYes then
WshNetwork.AddWindowsPrinterConnection PrinterPath
WshNetwork.SetDefaultPrinter PrinterPath
elseif answ=vbNo then
WshNetwork.AddWindowsPrinterConnection PrinterPath
end if
window.close()
-->
</SCRIPT>
</html>
<head>
</head>
<p><font face="Verdana">Printer connection...</font></p>
<script LANGUAGE="VBScript">
<!--
on error resume next
Set WshNetwork = CreateObject("WScript.Network")
PrinterPath = "\\Server\Printer"
msg="Do you want " & PrinterPath & " to be Default printer?"
answ=msgbox(msg,vbYesNoCancel,"Add Printer")
If answ=vbYes then
WshNetwork.AddWindowsPrinterConnection PrinterPath
WshNetwork.SetDefaultPrinter PrinterPath
elseif answ=vbNo then
WshNetwork.AddWindowsPrinterConnection PrinterPath
end if
window.close()
-->
</SCRIPT>
</html>
I want to achieve a couple things here.
1. I would like this to just execute as link from a page, rather than just being the page itself.
2. If that can't be done, I'd like the window to auto close, rather than a prompt to close the window popping up.
3. Anyway to have the activeX warnings go away? I understand if it is in my internal network, it won't be a problem.
Thanks for the help. I haven't done web design in ages, and especially not anything dynamic or flashy.