Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    Star Lounger
    Join Date
    Jan 2001
    Location
    Michigan - U.S.A.
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts
    We're running an old but critical DOS application on a Windows XP network. There is a label printer connected to the server that is accessed by networked computers. In order to do this, we've been using the following in a batch file: c:\windows\system32\net use lpt1 \\Server\Label /y (The server is named Server and the printer is named Label).
    We've now got a new Windows 7 machine that needs to access this printer, and apparently Net Use doesn't work the way it used to. I'm a complete Win7 noob, but I understand that it's possible. Does anyone have a clue what the syntax might be?

  2. #2
    5 Star Lounger
    Join Date
    Dec 2003
    Location
    Burrton, KS, USA
    Posts
    833
    Thanks
    0
    Thanked 2 Times in 2 Posts
    I don't think the net use command is the issue. Do you have a PHYSICAL lpt1 port on this machine? if so you may have to disable it in device manager. As a test, does net use lpt2 or lpt3 work?

    see the following thread

    http://social.technet.microsoft.com/...2-21f457cd0b70

  3. #3
    5 Star Lounger
    Join Date
    Dec 2009
    Location
    Rochdale, UK
    Posts
    852
    Thanks
    13
    Thanked 56 Times in 56 Posts
    The syntax looks pretty similar apart from the /y directive.

    If you type in "net use /help" without quotes at a command prompt it will show you the syntax for the command.

  4. #4
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    20,536
    Thanks
    1
    Thanked 614 Times in 550 Posts
    What OS is "Server" running? How many active connections to Server?

    Joe

  5. #5
    Star Lounger
    Join Date
    Jan 2001
    Location
    Michigan - U.S.A.
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The server is running Windows Server 2003. Currently there's only about 8 active connections. That shouldn't be a problem anyway, because the Windows 7 machine is a direct swap for the XP box we took out.
    Based on the link mercyh posted, I've revised the batch file to this: c:\windows\system32\net use lpt1 \\Server\label password /USER:workgroup\username
    I'm getting a 'System error 5 access denied' message. Hey, that's progress, right?
    By the way, I can't disable LPT1. There's a necessary local printer there. This whole schmear used to work fine with the XP computer. Dang.

  6. #6
    5 Star Lounger
    Join Date
    Dec 2003
    Location
    Burrton, KS, USA
    Posts
    833
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Can you test the syntax by using LPT2 ? This would ensure that the used LPT1 is not part of the problem.



    Any special characters in that password? sometimes special characters are not passed correctly from the command line.

    also I think the syntax is:

    Code:
    net use lpt1 \\Server\label /USER:workgroup\username "password"
    instead of

    Code:
    net use lpt1 \\Server\label password /USER:workgroup\username

  7. #7
    5 Star Lounger
    Join Date
    Dec 2003
    Location
    Burrton, KS, USA
    Posts
    833
    Thanks
    0
    Thanked 2 Times in 2 Posts
    If you just do:

    net use lpt1 \\Server\label /USER:workgroup\username
    does it prompt for your password? and does it work when you input the password manually?

    Be aware that if you get it to work once it will not work the second time until you disconnect it as you will already have a share mapped from that workstation to the server with that account.

  8. #8
    Star Lounger
    Join Date
    Jan 2001
    Location
    Michigan - U.S.A.
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Okay. I tried LPT2. That wouldn't work. It couldn't find the network connection.The
    I tried it without the password and it DID prompt for the password. Strangely, it wouldn't let me type anything in. At all. I finally hit ENTER and got an invalid password msg. The password is a 5-digit number - nothing fancy.
    ?????

  9. #9
    Platinum Lounger
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    3,619
    Thanks
    7
    Thanked 231 Times in 219 Posts
    Just type the password and press Enter - it's not meant to show any characters for security reasons.

    cheers, Paul

  10. #10
    Star Lounger
    Join Date
    Jan 2001
    Location
    Michigan - U.S.A.
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, Paul. Duh. Shoulda seen that. Even so, I still get a system error 5 - access denied. It IS the right name and password for that guy. Not sure what else to try, now. I hate to spend Friday this way.

  11. #11
    5 Star Lounger
    Join Date
    Dec 2003
    Location
    Burrton, KS, USA
    Posts
    833
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Did you look into the third post on the link I gave above?

  12. #12
    Star Lounger
    Join Date
    Jan 2001
    Location
    Michigan - U.S.A.
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for getting back to me late on a Friday. I just got home so I don't have access to the Win7 machine until Monday. I'll try that first thing. You may have hit something. Thanks again. Have a great WE.

  13. #13
    3 Star Lounger jockmullin's Avatar
    Join Date
    Dec 2009
    Location
    St-Eustache,QC,Canada
    Posts
    239
    Thanks
    10
    Thanked 21 Times in 20 Posts
    It sounds like you are almost there, but I suspect the sharing violation is due to the local lpt1 port - it is in use for the local printer.

    To test that, try disabling the lpt1 port temporarily in the bios, or change it to lpt2. If that solves the problem then configure the local printer to lpt2.

    If all else fails, implement XP mode on the Win 7 machine and install your legacy app there. Do the net use in the XP machine and publish the app to the Win7 desktop.

    Jock

  14. #14
    Star Lounger
    Join Date
    Jan 2001
    Location
    Michigan - U.S.A.
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts
    AHA! I believe I've at least isolated the problem. Typing NET USER at a command prompt shows that this ONE guy has a two word user name (Joe Smith). Everyone else is just Mary or Tom. I can't make two names in the batch file work, but without them, the user is not recognized. Is there a way to fix this - either at the server or in the batch file?

  15. #15
    Star Lounger
    Join Date
    Dec 2009
    Location
    Finland
    Posts
    53
    Thanks
    0
    Thanked 1 Time in 1 Post
    Quote Originally Posted by Keith View Post
    AHA! I believe I've at least isolated the problem. Typing NET USER at a command prompt shows that this ONE guy has a two word user name (Joe Smith). Everyone else is just Mary or Tom. I can't make two names in the batch file work, but without them, the user is not recognized. Is there a way to fix this - either at the server or in the batch file?
    Did you try "Joe Smith" including the parentheses?

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •