Results 1 to 6 of 6

Thread: "NET USE" command - how to use?

  1. #1
    Member
    Join Date
    Dec 2006
    Location
    UK
    Posts
    163
    Thanks
    0
    Thanked
    0 times in 0 posts

    "NET USE" command - how to use?

    hi.
    i regularly need to access a netowrk space that is password protected. i wanted a command to enter that would grant me access in 1 line, but i dont know how to use the command. this isnt reli making sense, so ill show you... lol

    my network folder is on
    the computer named COMP,
    with username MYNAME
    and password MYPASSWORD

    to gain access to this computers shared folders, i type the following in command prompt...
    Code:
    net use \\COMP /user:MYNAME
    it then asks for the password. i type it in, and clik enter. and its done.

    i want a way that i can include the password in the command, so i can execute the command from a batch file.

    any suggestions?

    thanx

  2. #2
    HEXUS.social member Agent's Avatar
    Join Date
    Jul 2003
    Location
    Internet
    Posts
    19,185
    Thanks
    739
    Thanked
    1,614 times in 1,050 posts
    Hi

    If you do "net use /?" in the command prompt, it will throw up the arguments it can accept, and the format in which they are required.

    In this case, it gives

    Code:
    C:\Documents and Settings\Administrator>net use /?
    The syntax of this command is:
    
    
    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}]]
    
    NET USE {devicename | *} [password | *] /HOME
    
    NET USE [/PERSISTENT:{YES | NO}]
    "[devicename | *] [\\computername\sharename[\volume] [password | *]]" is the bit you want
    Quote Originally Posted by Saracen View Post
    And by trying to force me to like small pants, they've alienated me.

  3. #3
    Senior Member
    Join Date
    Mar 2005
    Posts
    4,932
    Thanks
    171
    Thanked
    383 times in 310 posts
    • badass's system
      • Motherboard:
      • ASUS P8Z77-m pro
      • CPU:
      • Core i5 3570K
      • Memory:
      • 32GB
      • Storage:
      • 1TB Samsung 850 EVO, 2TB WD Green
      • Graphics card(s):
      • Radeon RX 580
      • PSU:
      • Corsair HX520W
      • Case:
      • Silverstone SG02-F
      • Operating System:
      • Windows 10 X64
      • Monitor(s):
      • Del U2311, LG226WTQ
      • Internet:
      • 80/20 FTTC
    Quote Originally Posted by hsncool View Post
    hi.
    i regularly need to access a netowrk space that is password protected. i wanted a command to enter that would grant me access in 1 line, but i dont know how to use the command. this isnt reli making sense, so ill show you... lol

    my network folder is on
    the computer named COMP,
    with username MYNAME
    and password MYPASSWORD

    to gain access to this computers shared folders, i type the following in command prompt...
    Code:
    net use \\COMP /user:MYNAME
    it then asks for the password. i type it in, and clik enter. and its done.

    i want a way that i can include the password in the command, so i can execute the command from a batch file.

    any suggestions?

    thanx
    You can only map to shares on the computer, not the computer itself, so you will need to type:

    NET USE Z: \\COMPUTERNAME\SHARENAME /user:username password
    "In a perfect world... spammers would get caught, go to jail, and share a cell with many men who have enlarged their penises, taken Viagra and are looking for a new relationship."

  4. #4
    Member
    Join Date
    Dec 2006
    Location
    UK
    Posts
    163
    Thanks
    0
    Thanked
    0 times in 0 posts
    yeah, i get that agent, but the actuall problem is, i dont know what all that syntax is lol. what formatting do i use? exactly what command do i need, if my pass was MYPASSWORD and user MYNAME and comp&share was \\COMP\SHARE
    ?

  5. #5
    Large Member
    Join Date
    Jan 2004
    Location
    Glasgae
    Posts
    440
    Thanks
    6
    Thanked
    1 time in 1 post
    emmm

    NET USE Z: \\COMP\SHARE /user:MYNAME MYPASSWORD

    Add /PERSISTENT:YES on the end to remap each login

    Eye popping good!
    There was a funny quote here

  6. #6
    Senior Member
    Join Date
    Aug 2003
    Location
    Withernsea
    Posts
    327
    Thanks
    2
    Thanked
    1 time in 1 post
    you can also replace the computername with the ip address

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Anyone ever receive a package from "Net Lynk" they didn't order?
    By Paul Adams in forum General Discussion
    Replies: 10
    Last Post: 21-09-2006, 11:41 PM

Posting Permissions

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