Sign in with
Sign up | Sign in
Your question

Net use

Last response: in Windows XP
March 5, 2012 12:21:57 AM

trying to create a directory on a remote machine - in a workgroup

net use \\\c$ password:12345zyx/user:username

if exist \\\c$\misc goto done
echo "make directory"
md \\\c$\misc <-- error here
done:echo "done"

the result is an error message - 'access denied' and it occurs at the md \\ command
i placed the password and user name on the line and that generated an error

any ideas

More about : net

March 12, 2012 3:40:23 AM

Users not allowed to create directories under those rights.
You need to access as administrator. Thus 'access denied'.
Either that or PC not accepting Remote Administration.
March 13, 2012 3:46:15 PM

thanks for reply, here is the solution i found and makes no sense to me, but it runs

net use \\\c$ /user:administrator password
if exist \\\c$\misc goto done
echo "make directory"
md \\\c$\misc
:D one
echo "done"
Related resources

Best solution

March 14, 2012 3:20:39 PM

The user needs to come before the password in the net use line. Plus not having admin rights to the machine would cause this. To even get to the hidden c$ share you need to use a local admin account.
March 15, 2012 12:20:06 AM

Best answer selected by tomold.