Hello all i have a small network with 1 server Windows 2003, Standard and 5 clients WinXP Pro connected to a switch on a domain with 1 lpt printer that is shared throughout the network... I currently have the lpt printer mapped out on all the clients using the following command
net use lpt1: \\server\printer /Persistent:yes
Now i would like to know is there a net use command to keep a persistent connection with a usb printer attatched to the sever just like the lpt one.
Thanks in Advance
Eddie
Page 1 of 1
Can you map a usb printer to a computer using... ...the net use command from dos
#2
Posted 24 April 2005 - 05:02 AM
mean of connection to the printer doesn't matter at all since you have to create a port that users will use to print to, so printer can be connected as lpt, com, usb or ethernet
#3
Posted 27 April 2005 - 06:58 PM
exactly...
so long as the share name (\\server\printersharename) is correct, it should be fine.
You might want to look up the kixtart scripting way of doing things - works great for me with servers set up on the server and shared for users to print using....
http://www.kixtart.org/
http://www.scriptlogic.com/Kixtart/htmlhel...ord-index.asp#A
I cant provide an example at the moment as I'm off work after an operation, but in 3-4 weeks, I might be able to help you further with it.
Regards,
N.
so long as the share name (\\server\printersharename) is correct, it should be fine.
You might want to look up the kixtart scripting way of doing things - works great for me with servers set up on the server and shared for users to print using....
http://www.kixtart.org/
http://www.scriptlogic.com/Kixtart/htmlhel...ord-index.asp#A
I cant provide an example at the moment as I'm off work after an operation, but in 3-4 weeks, I might be able to help you further with it.
Regards,
N.
#4
Posted 27 April 2005 - 09:58 PM
Thanks for the info but im still a little confused.. are you telling me i can type in
net use lpt1: \\server\LPTprinter /Persistent:yes
for the LPT printer
and
net use lpt1: \\server\USBprinter /Persistent:yes
for the usb printer
and this will work fine... it doesnt matter if i use lpt1 or lpt2 or usb in the command?
Thanks for the replies btw
Eddie
net use lpt1: \\server\LPTprinter /Persistent:yes
for the LPT printer
and
net use lpt1: \\server\USBprinter /Persistent:yes
for the usb printer
and this will work fine... it doesnt matter if i use lpt1 or lpt2 or usb in the command?
Thanks for the replies btw
Eddie
#5
Posted 27 April 2005 - 10:16 PM
cant say for sure 100% as i use the kixtart script in logging on which is soooo much better but yeah, theoretically, it shouldnt matter what the port is called on the client machine.
With XP, domains and printers, me and my colegues in the other schools use kixtart for attaching printers in the logon scripts so i'm not sure you see, having never done it any other way.
You can try it, but your best bet would be to try the kixtart way if u have time to have a play with it.
cheers,
Nath
With XP, domains and printers, me and my colegues in the other schools use kixtart for attaching printers in the logon scripts so i'm not sure you see, having never done it any other way.
You can try it, but your best bet would be to try the kixtart way if u have time to have a play with it.
cheers,
Nath
#6
Posted 28 April 2005 - 12:03 AM
Cytomax, on Apr 27 2005, 09:58 PM, said:
Thanks for the info but im still a little confused.. are you telling me i can type in
net use lpt1: \\server\LPTprinter /Persistent:yes
for the LPT printer
and
net use lpt1: \\server\USBprinter /Persistent:yes
for the usb printer
and this will work fine... it doesnt matter if i use lpt1 or lpt2 or usb in the command?
Thanks for the replies btw
Eddie
<{POST_SNAPBACK}>
net use lpt1: \\server\LPTprinter /Persistent:yes
for the LPT printer
and
net use lpt1: \\server\USBprinter /Persistent:yes
for the usb printer
and this will work fine... it doesnt matter if i use lpt1 or lpt2 or usb in the command?
Thanks for the replies btw
Eddie
<{POST_SNAPBACK}>
I would strongly reccomend not to use batch files as logon scripts, but use vbs ... anyway, the port that you map on the workstation using logon script doesn't matter, as long as there is no local printer installed and connected to lpt1, and yes you can map usb printer that is connected on the server, to lpt1 port on the workstation ... here is an example of printer connection using vbs
Dim net
Set net = CreateObject("WScript.Network")
net.AddWindowsPrinterConnection "\\Server\HPLJ4", "HPLJ4"
word Server replace with your actual server name, HPLJ4 is the name of the port on the server
this is how you set default printer using vbs
Set net = CreateObject("WScript.Network")
net.SetDefaultPrinter "\\Server\HPLJ4"
if you wonder how to map drives using vbs here is an example
Dim WshNetwork
Set WshNetwork = WScript.CreateObject("WScript.Network")
WshNetwork.MapNetworkDrive "Q:", "\\Server\SharedFolder"
and to map user home folders use this [b]Note:you must remove home mappings from user properties in Active Directory users and Computers if any is there![b/]
' VBScript.
' Mapping user home folder on the server
Dim oNet, sUser
Set oNet = CreateObject("Wscript.Network")
sUser =oNet.UserName
oNet.MapNetworkDrive "P:", "\\Server\" & sUser
The map user home folder should actually be the first lines of the code in the script so it looks like this
' VBScript.
' Mapping user home folder on the server
Dim oNet, sUser
Set oNet = CreateObject("Wscript.Network")
sUser =oNet.UserName
oNet.MapNetworkDrive "P:", "\\Server\" & sUser
Dim WshNetwork
Set WshNetwork = WScript.CreateObject("WScript.Network")
WshNetwork.MapNetworkDrive "Q:", "\\Server\SharedFolder"
Dim net
Set net = CreateObject("WScript.Network")
net.AddWindowsPrinterConnection "\\Server\HPLJ4", "HPLJ4"
Set net = CreateObject("WScript.Network")
net.SetDefaultPrinter "\\Server\HPLJ4"
Remember to save the script as vbs file (*.vbs)
#7
Posted 28 April 2005 - 12:51 PM
not to start flaming, but you didnt explain why you recomend not using batch files in logon scripts...
Easy to use, understand and alter.
kixtart scripting is not the same as a batch file but is run from a batch file with one command. Some of the commands look very similar to vbs but its alot simpler and works a treat.
But each to their own of course...
If you need a hand with batch/kixtart scripting for the task you asked about, feel free to PM me
Regards,
Nath.
Easy to use, understand and alter.
kixtart scripting is not the same as a batch file but is run from a batch file with one command. Some of the commands look very similar to vbs but its alot simpler and works a treat.
But each to their own of course...
If you need a hand with batch/kixtart scripting for the task you asked about, feel free to PM me
Regards,
Nath.
#8
Posted 28 April 2005 - 04:10 PM
Just because VBS can do more stuff than batch file can ... just for a start to map user home folder os much more complicated using batch file (writing it by hand and not third party program) ... and again, that's my personal reccomendation
Share this topic:
Page 1 of 1



Help
Back to top









