# Thread: Windows 7 and Net Use syntax

1. 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. 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?

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

3. 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. What OS is "Server" running? How many active connections to Server?

Joe

5. 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. 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"

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

7. If you just do:

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. 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. Just type the password and press Enter - it's not meant to show any characters for security reasons.

cheers, Paul

10. 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. Did you look into the third post on the link I gave above?

12. 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. 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. 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. Originally Posted by Keith
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 Last

#### Posting Permissions

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