Cytomax Posted April 24, 2005 Share Posted April 24, 2005 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 commandnet use lpt1: \\server\printer /Persistent:yesNow 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 AdvanceEddie Link to comment Share on other sites More sharing options...
valter Posted April 24, 2005 Share Posted April 24, 2005 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 Link to comment Share on other sites More sharing options...
tarquel Posted April 28, 2005 Share Posted April 28, 2005 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#AI 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. Link to comment Share on other sites More sharing options...
Cytomax Posted April 28, 2005 Author Share Posted April 28, 2005 Thanks for the info but im still a little confused.. are you telling me i can type innet use lpt1: \\server\LPTprinter /Persistent:yesfor the LPT printerandnet use lpt1: \\server\USBprinter /Persistent:yesfor the usb printerand this will work fine... it doesnt matter if i use lpt1 or lpt2 or usb in the command?Thanks for the replies btwEddie Link to comment Share on other sites More sharing options...
tarquel Posted April 28, 2005 Share Posted April 28, 2005 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 Link to comment Share on other sites More sharing options...
valter Posted April 28, 2005 Share Posted April 28, 2005 Thanks for the info but im still a little confused.. are you telling me i can type innet use lpt1: \\server\LPTprinter /Persistent:yesfor the LPT printerandnet use lpt1: \\server\USBprinter /Persistent:yesfor the usb printerand this will work fine... it doesnt matter if i use lpt1 or lpt2 or usb in the command?Thanks for the replies btwEddie<{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 vbsDim netSet 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 serverthis is how you set default printer using vbsSet net = CreateObject("WScript.Network") net.SetDefaultPrinter "\\Server\HPLJ4"if you wonder how to map drives using vbs here is an exampleDim WshNetworkSet WshNetwork = WScript.CreateObject("WScript.Network")WshNetwork.MapNetworkDrive "Q:", "\\Server\SharedFolder"and to map user home folders use this 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 serverDim oNet, sUserSet oNet = CreateObject("Wscript.Network")sUser =oNet.UserNameoNet.MapNetworkDrive "P:", "\\Server\" & sUserThe 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 serverDim oNet, sUserSet oNet = CreateObject("Wscript.Network")sUser =oNet.UserNameoNet.MapNetworkDrive "P:", "\\Server\" & sUser Dim WshNetworkSet WshNetwork = WScript.CreateObject("WScript.Network")WshNetwork.MapNetworkDrive "Q:", "\\Server\SharedFolder"Dim netSet 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) Link to comment Share on other sites More sharing options...
tarquel Posted April 28, 2005 Share Posted April 28, 2005 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. Link to comment Share on other sites More sharing options...
valter Posted April 28, 2005 Share Posted April 28, 2005 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now