Results 1 to 4 of 4

Thread: help with "NET USE"

  1. #1

    help with "NET USE"

    I haven't used the NET USE command line for quite some time and have used it very little.
    I want to make a batch file that will connect to a share on a server. I need the command line to include the username and the password but I don't know the contextm. I've done some searching but haven't found anything that works, can someone show me an example of the context for putting both username and password in the command line.

    thanks,

    jim

  2. #2
    Join Date
    Aug 2006
    Location
    255.255.255.666
    Posts
    2,056
    You can open the command line and get the help on it by:
    net use /?
    Anyhow here is an example of the context that you wanted to use:

    "net use_\\computername\sharename\volume_password_/user:domainname\username_password"
    Legend: Bold characters are non-variables, it doesn't change. The others you substitute with whatever is applicable to you.
    First password is for the share (if there is one), the second one is for the user(again if applicable).
    I used the "" for wrapping purposes so if the command interpreter (system) is not configured to support long file names, this would help the command to remain valid and work even in a batch file.

    Each underscore needs to be replaced with a single space!!

    A very good alternative freebie you could use is Mapper24 0.2.3

    I hope this helps.

  3. #3
    the net use/? doesn't give a very good description of how I wanted to do it, neither does the Microsoft site. But I got it to work the way I needed to.
    Haven't used that command since the days of NT4.

  4. #4
    Join Date
    Aug 2006
    Location
    255.255.255.666
    Posts
    2,056
    I have to agree, most of the help info associated with the commands are more confusing than helpful. I hope I got the syntax correct because it has been a long while for me as well!

    Also it could get confusing with all its parameters but even if I was off a bit, it should have gotten you closer to figuring out what you wanted it to accomplish in the batch file.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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