Cannot map network drives using 'net use' while elevated as an administrator

3

So, this problem stems from not being able to save anything on my network drives. I tried using takeown on everything in the network drive as the user Joey (which is an administrator on my computer because it's the only user account and it says so in the control panel, right?), so I decided to run cmd.exe as an administrator. Now it can't find the network drive to cd to, so I looked that up and found that it has to be mapped as an administrator.

net use f: \\joey-laptop\users\joey\my documents\folder is the command I'm using, and it gives me this output:

    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

    C:\Users\Joey>cd /DF:\
    The system cannot find the path specified.

    C:\Users\Joey>net use f: \\joey-laptop\user\joey\my documents\folder\
    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}]


    C:\Users\Joey>

I don't really know why it's giving me the help info, but it is, so I'm assuming it would be doing this regardless of the folder I was trying to map to. What am I doing wrong?

EDIT: F:\ is already mapped, but that was done as Joey. I read that net use lets you overwrite existing maps.

EDIT 2: Access denied when writing files to network drive is somewhat of a follow-up question to this.

Joey Miller

Posted 2014-01-04T22:00:37.023

Reputation: 235

Can you ping joey-laptop from the machine you are running net use from? And does it definitely have a share called user? – Paul – 2014-01-04T23:46:08.003

Thanks @Paul. Ping was 0ms because joey-laptop is my machine. I made a typo in the command up there, the share is actually supposed to be called users, but it still gives me the same error. – Joey Miller – 2014-01-05T00:05:10.973

Oh, you are trying to map a drive to your own machine via the network? There are other ways to do this, but anyway, can you try this via explorer, it might give a clue as to why it isn't working. Press <kbd>alt</kbd> to show the menu, then Tools / Map Network Drive – Paul – 2014-01-05T00:35:18.810

Yes, except I need to create the network drive as an administrator so I can modify its permissions. It all kinda comes back to my network drives somehow not letting me do anything to them. – Joey Miller – 2014-01-05T00:45:01.000

I see you have the answer, but note you can run explorer.exe as administrator as well. – Paul – 2014-01-05T03:34:13.037

@Paul thank you, I tried that but I don't believe it worked. – Joey Miller – 2014-01-05T19:25:55.543

Answers

2

It's because of the space in your path argument ("my documents").

Wrap the path in quotes so Windows knows it's a single argument:

net use f: "\\joey-laptop\user\joey\my documents\folder\"

Ƭᴇcʜιᴇ007

Posted 2014-01-04T22:00:37.023

Reputation: 103 763