Reply
Thu 15 Mar, 2007 01:15 am
hi everyone
i'm making a batch file which allows removing, adding and setting default printer under win xp, it works great but i'd also like to add the option in the batch file to list the current printers installed, preferably by share name since adding with rundll32.dll printui is done by share name. Any ideas how this can be done?
Thanks alot,
michael
michael,
i don't know the answer, but will follow along.
every time i re-boot at work, a batch file loads two dozen printers.
i only use 5 or 6 of them, so i manually delete the ones i don't need.
a batch file to counter this would come in handy...
Don't know about doing it under the DOS prompt, but Microsoft has a nice repository of scripts for just about any need.
http://www.microsoft.com/technet/scriptcenter/scripts/default.mspx?mfr=true
I've been able to show locally connected printers with
net view hostname | find "Print"
but i have not been able to show remotely connected printers with my batch file as of yet, any ideas?
I think you need to move from using the command prompt to using Windows Scripting Host.
Windows Scripting Host will allow you to do anything that you can do in the GUI. The command prompt is pretty limited.