Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I was asked to add pinters to all users on a terminal server. There is a VPN connection between the terminal server and the network where the printer is installed.

I do not have much experience with network shares, but I managed to connect to the printer manually. (win+r > \192.168.xx.xx). After entering my credentials (Domain: ADAM.local) I see the shares in explorer, including a couple of printers. Double-clicking a printer adds it to the "printers and devices" and I am able to select it as a printer wehn trying to print a document.

I was hoping to be able to use "net use" to write a script that will connect a user to the printer on startup.

I tried using net use * \\192.168.xx.xx <password> /user:ADAM.local\printACC /persistent:yes to connect to the network share. This results in an error: System error 67 has occurred. The network name cannot be found.

Could anyone help me with the syntax and parameters for the net use command?

share|improve this question
    
What type of server is this? What type of server is your print server? –  Nixphoe Feb 3 '12 at 12:28
    
@Nixphoe It's a terminal server on Windows Server 2008 R2. I am not sure what type of printer server it is. All I got from the tech guy @ the customer are the IP of the share, the domain and the share's account login details. –  Chielt Feb 4 '12 at 20:36
add comment

3 Answers

Terminal server maps/sets the default client printers from the desktop it connects from as default in user session.

To make this work You need to make sure that on the terminal server only the printer driver is installed. Install both 32 and 64 bit version. No need to map. adding just drivers to terminal server

Make sure that the terminal server settings allow printer mapping. leave checkbox UNCHECKED. enter image description here

The printing goes from the terminal server via the rdp protocol to the printer through the client.

Another options is to install all the printers as administrator on the server. They will be available to all users. However I do not recommend this. I think it is better to always redirect user to his default printer.

share|improve this answer
    
This might have been a solution to the problem, but I will never be able to test it as the problem was nearly 2 years ago and I no longer work for the company. Also, I'm pretty sure the client would have sacked us if it took 2 years to fix their printers ;) Thanks for the help anyway. –  Chielt Jan 17 at 9:37
add comment

You can't use the net use command.

You do have a few options however. If you have a 2008 Domain, you can use Group Policy to deploy your printers.

If you don't have a 2008 print server, you'll need to use a login script. Add the following line to your login script:

cscript \\domain.local\NETLOGON\Printer.vbs //B

After that, add a file, call it Printer.vbs and put the following in it.

Option Explicit
Dim objNetwork, strPrinter1,strPrinter2,strPrinter3

strPrinter1 = "\\servername\printerx"
strPrinter2 = "\\servername\printery"
strPrinter3 = "\\servername\printerz"

Set objNetwork = CreateObject("WScript.Network") 
objNetwork.AddWindowsPrinterConnection strPrinter1
objNetwork.AddWindowsPrinterConnection strPrinter2
objNetwork.AddWindowsPrinterConnection strPrinter3

WScript.Quit
share|improve this answer
    
But connecting to the network share requires a password and a domain. How do I sort this? I have the following details: IP: 192.168.xx.xx Domain: ADAM.local Username: PrintACC Password: <pass> –  Chielt Feb 3 '12 at 12:46
    
Ah, I guess I didn't understand that requirement correctly, so the terminal server isn't on the domain? –  Nixphoe Feb 3 '12 at 14:19
    
The printers are in the company building. The terminal server is in the datacenter. There is a VPN between the two. Start > Run > \\192.168.xx.xx gives me a login prompt. I then fill in ADAM\PrintACC and a password. An explorer window then pops up showing me the network share. I then double click one of the printers listed. The terminal proceeds by adding the printer to my "printers and devices". Ik also opens the printer que window. The TS is in the PROFIT\ domain. –  Chielt Feb 3 '12 at 14:58
    
I am trying to deploy the printers using "Print Management" but the printers are not listed. Trying to add them with TCP/IP seems impossible, and they are also not detected by the wizzard... –  Chielt Feb 3 '12 at 15:00
    
If the terminal server in a domain you control? Possibly adding a domain trust could solve your issue. –  Bad Dos Aug 2 '13 at 15:30
add comment

I thought when I tried to use the net use command, I use the LPT2 or LPT3 as the destination port, not *. I once can use the net use command successfully, but I don't use any username and password. Just, for example: NET USE LPT2: \\SERVER\CANONIP /persistent:yes and it works like a charm. I think your code is already correct. There's another problem somewhere. Sorry for not being too helpful.

share|improve this answer
    
Your answer is wrong and does not take into account that actually the terminal server may not "see" \\server\canonip . This is not how it was designed to work. –  Bartłomiej Zarzecki Jan 16 at 8:23
    
yes, I only take from my experience. people's circumstances may vary. but I just saying that it is possible for my example to works. and in case that the server cannot "see" the destination path, one must make sure he can connect to the server manually first with a username and password. maybe the username / password he supplied is wrong or something. that's what I'm saying, derived from my experience, I said it maybe other problems somewhere. I just help to narrow down the problem, and as I can't write a comment yet, so I write as an answer instead. –  Chen Li Yong Jan 17 at 2:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.