Re: Manage printers on remote computer



Im trying to work on something very similar, all my computers are 2003
and XP though. But it would be better to have the script/batch
portable to older systems.

The rundll32 command is very cool. I got the following command to add
a network printer when run from a machine

rundll32 printui.dll,PrintUIentry /in /c\\<local_machine_name>
/n\\<server_name>\<printer_name>

However I would like it to be more full featured, meaning that if I
changed the port on the server all the clients when they run the
script/cmd would get the printer at the new port.

The Windows Script repository had the following script for mapping
printers:

Set WshNetwork = CreateObject("WScript.Network")

WshNetwork.AddWindowsPrinterConnection "\\PrintServer1\Xerox300"
WshNetwork.SetDefaultPrinter "\\PrintServer1\Xerox300"

But this doesn't work at all. When Option Explicit is added to the
begining it generates an error with Variable is undefined: 'WshNetwork'

Using rundll32 in my above method, will it pick up port changes on the
server and put the client on the new port. Or would a seperate script
have to be run to remove the old network connected printer? I tried -

rundll32 printui.dll,PrintUIEntry /dn

To remove a network connected printer, but not matter how I specified
host/printer it always generated an error.

Thanks for any help.

.



Relevant Pages

  • Re: How to Create a TCP/IP PrinterPort on a MS Cluster 2k3 via Scr
    ... XP is not in the cluster so I'm not clear on the failure question. ... the user running the script should be admin on the remote print server. ... thus the creation of the port on the node. ...
    (microsoft.public.windows.server.clustering)
  • Re: How to Create a TCP/IP PrinterPort on a MS Cluster 2k3 via Scr
    ... XP is not in the cluster so I'm not clear on the failure question. ... the user running the script should be admin on the remote print server. ... thus the creation of the port on the node. ...
    (microsoft.public.windows.server.clustering)
  • Firewall Rules Summary
    ... Subject: Firewall Rules Summary ... This script is provided "as is" with no implied warranty. ... this came from various howtos and articles on iptables that existed around ... #specific port denies>1024 tcp ...
    (Focus-Linux)
  • Re: How to Create a TCP/IP PrinterPort on a MS Cluster 2k3 via Scr
    ... I think Edwin is using the prnport.vbs script from the OS what uses the WMI ... thus the creation of the port on the node. ... NOT in de cluster resource! ... virtualPrinter in MSCS. ...
    (microsoft.public.windows.server.clustering)
  • Re: reverse ssh
    ... > logged into either box) can use the tunnel for whatever connects to it. ... > I suggest you connnect back to your home system's 'sshd' port and then you ... > will have to satisfy the home box's login authorization to get access ... > password from your script. ...
    (freebsd-questions)