Re: Manage printers on remote computer
- From: "mike.burton@xxxxxxxxx" <mike.burton@xxxxxxxxx>
- Date: 11 Jan 2006 13:28:30 -0800
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.
.
- Prev by Date: Re: Complex Password Scripting
- Next by Date: Re: Complex Password Scripting
- Previous by thread: Re: Complex Password Scripting
- Next by thread: Re: Monad beta3 "features?"
- Index(es):
Relevant Pages
|