Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 893
  • Last Modified:

Net Use command (Connect to network printer)

I know how to use the Net Use command to connect to a network printer.  Now I have the following problem:

One Windows 2000 workstation (Not a domain network) needs to connect to a shared local printer on another Windows 2000 workstation.  And I need a script to run on bootup or login that uses the correct username and password for this connection.  Here is somewhat of an idea of what I'm trying to do, though this doesn't work:

Net Use \\office1\HPLaser Username Password
0
HKComputer
Asked:
HKComputer
  • 4
  • 3
1 Solution
 
bstrauss3Commented:
I don't have 2K running anymore, but the syntax for XP is this:

NET USE
[devicename | *] [\\computername\sharename[\volume] [password | *]]
        [/USER:[domainname\]username]
        [/USER:[dotted domain name\]username]
        [/USER:[username@dotted domain name]
        [/SMARTCARD]
        [/SAVECRED]
        [[/DELETE] | [/PERSISTENT:{YES | NO}]]

So you should probably try

net use \\office1\HPLaser password /USER:username

-----Burton
0
 
HKComputerAuthor Commented:
Do you need to use the devicename?
0
 
bstrauss3Commented:
No, it's optional (note the []s).

-----Burton
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
adamdrayerCommented:
It is optional, but if the software requires a local device like lpt1 or lpt2, then you'll have to use the devicename
0
 
HKComputerAuthor Commented:
This solution does not work.  I tried the following from the command line (cmd):

net use \\office1\HPLaser password /USER:username

It brings up the help screen to inform me of the proper syntax.
0
 
bstrauss3Commented:
Maybe the syntax changed between 2K and XP.  What does net help use show?

-----Burton
0
 
HKComputerAuthor Commented:
I seem to have it working now.  I'm now using uppercase for USER.  That is the only thing I changed.  I also have it in a batch file instead of running it manually from the command line.  I'm not sure where the hiccup was/is.

Thanks -HK
0
 
bstrauss3Commented:
The net help use does show it in UPPER case.  Maybe that's actually required... which is weird but not the weirdest.

Glad it's working!

-----Burton
0

Featured Post

Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now