LPT1 Access is Denied

I have a windows 7 client computer with a printer that uses lpt1. The client computer connects to a remote desktop server to run applications. The remote desktop server has an lpt1 mapping created via a login script with the below line.

net use lpt1 \\clientsystem\printer /persistent:yes

the lpt1 port is established and I know this by running net use by itself.

the server is windows server 2008R2

when attempting to print I receive the error message "Access Is Denied"

The client system is in a different network than  the server. If I connect my computer to the rdp server with a different lpt printer it works and the job prints. I would use a command such as

net use lpt1 \\mylaptop\myprinter

The only difference is the networks.

I have verified that firewalls are off on all computers. I can ping in any direction. I have turned off all antivirus. the LPT printer is shared the same on way on both computers with the same security settings.

Please help with your suggestions.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Emmanuel AdebayoGlobal Windows Infrastructure Engineer - ConsultantCommented:
Is the use in the Print Operators group.?

You can disable the LPT1 in Device Manager makes it a logical port (such as LPT2 and LPT3) instead of a physical port.

Also, it might be caused by smb authentication
You do NOT want to make this user a member of the Print Operators group, unless they are a designated IT Administrator within your organization.

Members of this group, among other things, are able to log in to any server or Domain Controller on your network and shut them down.

The steps below will allow the Windows 2008 server to have a printer defined on it to print to the Windows 7 PC's attached printer via Windows apps or LPT1.

There will be 5 basic steps to resolve the issue
    1- Setup the printer on the Windows 7 PC
    2- Install LPD print service on the Windows 7 PC hosting the printer
    3- Install LPR port monitor on the RDP Server from which you want to print
    4- Setup a Windows printer on the same RDP Server from step 3, but use LPR printing.
    5- Enable printer pooling on the newly created printer from Step 4 (Allows LPT1 printing to the new printer)

Step 1 - Setup the printer on the Windows 7 workstation and make sure it prints successfully - Done

Step 2 - Enable LPD on a Windows 7 PC hosting the printer (This will allow you to have another way to get the jobs into the print queue)
    a- GoTo Start and type appwiz.cpl in the search box and hit Enter
    b- Click on Turn Windows features on and off in the left pane
    c- Click the + sign next to Print and Document Services
    d- Enable the feature for LPD Print Service
    e- Click OK
    f- You may be prompted to Restart

Step 3 - Enable LPR port monitor on the Windows 2008 server
  If Server Manager loads after logging in, jump to item b, otherwise...
    a- GoTo Start and type servermanager.msc in the search box and hit Enter
    b- Highlight "Features" in the left pane
    c- Click on Add Features on the right
    d- Enable the LPR Port Monitor
    e- Click on Next
    f- Click Install
    g- Click Close

Step 4 - Setup a printer to use LPR on the Windows 2008 server
    a- GoTo Start | Devices and Printers
    b- Add a Printer
    c- Add a Local Printer or network printer as Administrator
    d- Add a local printer
    e- Select Create a new Port
    f- Select LPR Port from the drop down menu
    g- Click Next
    h- In the top field ("Name or address of server providing LPD"), enter the TCP/IP address of the Windows 7 PC hosting the printer  
    i- In the bottom field ("Name of printer or print queue on that server"), enter the name of the desired Windows printer on the Windows 7 PC
    j- Click OK
    k- Continue onward with a normal Windows printer setup by picking the desired print driver and naming the printer until finished
         Note: Sharing the printer is not necessary during the setup process
    l- Open the newly created printer's properties
    m- GoTo the Ports tab
    n- Uncheck Enable Bidirectional support if it's enabled
    o- Click Apply
    p- Click on the General tab
    q- Send a test page
    r- Click OK to close
Step 5 - Enable printer pooling for LPT1 on the new printer on the Windows 2008 server   ***(Delete the persistent mapping of LPT1 if you have not already done so, then continue)***
  1) Go to the Properties of the Windows printer created in Step 4
  2) Click on the Ports tab
  3) Click the box next to Enable Printer Pooling at the bottom left
  4) Look back up to the available port selection window at the top and scroll up to the top (Do not uncheck your existing port)
  5) When you see LPT1, click the box to the left of it
  6) Click on Apply
  7) Click on Ok to exit

    1- This methodology will allow the desired Windows Server to print to the printer on the Windows 7 PC without having to modify the permissions or use a guest account.
    2- LPR uses 11 ports by default so if a sending server needs to send more than 11 print jobs within a minute or two, let me know and I can explain how to increase the # of available ports. Without the change there would be a delay on the 12th print job of a couple minutes, but it would still print.  I only mention this because if you need to print lots of small jobs in a short period of time, it will be necessary.  I have found that this is not necessary for 97% of all of the setups that I have encountered.
    3- Printer Pooling overview - If the printer is setup in Windows, you can also use it in DOS.  We just enable printer pooling on that printer to add LPT1. Anything sent to LPT1 in DOS will go through the Windows printer to the destination, regardless of whether that destination is local or networked.
kwoznica732Author Commented:
It turned out to be SMB. I disabled SMB version 2 on both the server and client in the registry which forces SMB version 1.
Why LPT1 needs SMB v1 when both win7 and server 2008R2 support SMBv2, I have no idea. Thanks all for your suggestions.

Using the Regedit to disable SMB2 on the server (I used this one).
        1.Run "regedit" on Windows Server 2008 based computer.
        2.Expand and locate the sub tree as follows.
        3.Add a new REG_DWORD key with the name of "Smb2" (without quotation mark)
        Value name: Smb2
        Value type: REG_DWORD
            0 = disabled
            1 = enabled
        4.Set the value to 0 to disable SMB 2.0, or set it to 1 to re-enable SMB 2.0.
        5.Reboot the server.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kwoznica732Author Commented:
I discovered the solution before the experts started posting.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2008

From novice to tech pro — start learning today.