7
1
I'm running into a curious issue. As part of a deployment routine, I'm mounting the c$
share of a remote server and copying files to that share, then disconnecting it with net use <drive> /delete
. However, I'm encountering strange behavior:
C:\Users\user>net use T: /delete
System error 2 has occurred.
The system cannot find the file specified.
Okay, well I'll just use Windows itself to disconnect the file. Computer shows:
Well that's odd...let's just right-click -> Disconn...oh...
Since this isn't a persistent mount, it'll be gone on a reboot. However, I'd like to know why this happens. On a related note, all my network drives have the red "X" but I can get into all of them just fine. I don't hear problems from other users on the network, so it's puzzling.
Oh, to add to the puzzle:
C:\Users\user>net use
System error 2 has occurred.
The system cannot find the file specified.
Any idea what's going on? This is Windows 7 Pro x64, all updates applied.
Still having this problem...and it also happens with drives I just mapped manually – Nathan C – 2014-06-20T15:46:39.597
Does it happen just on this machine, for all drives? Or does it happen just on certain drives, from every machine? – Jason C – 2014-06-20T16:14:34.117
Just this machine, all drives. – Nathan C – 2014-06-20T16:15:24.677
See Google results for "net use system error 2 has occurred". In particular, one user found that by uninstalling then reinstalling recent Windows updates, the problem was resolved. Another user had to manually install net1.exe. You could try the old
– Jason C – 2014-06-20T16:17:52.393sfc /scannow
as well.(1) Is there any difference when using the syntax of "net use \server\C$ /delete" or "net use * /d"? (2) See with Process Explorer if anything is using the share. (3) See if the registry hack in this article helps.
– harrymc – 2014-06-21T08:17:00.070@NathanC Have you tried a different drive letter? There might be some confilct. – EliadTech – 2014-06-22T22:07:14.300
@harrymc Same error message. Process Explorer says nothing open, and the registry hack doesn't work...the entry isn't there. – Nathan C – 2014-06-22T23:44:13.707
Try also the advice in this article.
– harrymc – 2014-06-23T09:37:19.070What do you get when you just type
net
incmd
? You might have some messed up permissions where you can't access what's in the System32 folder... – Kinnectus – 2014-06-23T15:26:57.180@BigChris It gives me the syntax of the command. If I type
net use
, I get the "cannot find the file specified" error. – Nathan C – 2014-06-23T15:29:50.907Are the drives mapped w/ the same account running
net use /delete
?? – MDMoore313 – 2014-05-01T16:52:38.707@BigHomie Yes, they are. – Nathan C – 2014-05-01T16:52:59.913
Can you delete them after you go into the drive (and thus, after the red X goes away) and exit back out? – MDMoore313 – 2014-05-01T16:53:50.150
@BigHomie Nope. The red X still remains as well. – Nathan C – 2014-05-01T16:54:29.333
Have you patched heartbleed? – MDMoore313 – 2014-05-01T16:55:32.523
2@BigHomie Well...yes, don't see how that relates though. – Nathan C – 2014-05-01T16:55:58.450
Is this being run in an elevated cmd prompt? – MDMoore313 – 2014-05-01T16:57:50.963
@BigHomie No. Elevated has the same errors as above (but is expected since the mounts wouldn't be visible) and
net use
alone also shows the same error. – Nathan C – 2014-05-01T16:59:09.9701
..As part of a deployment routine, I'm mounting the c$ share of a remote server and copying files to that share..
Can you provide more detail as to how/when these drives are mapped, and also has this always been a problem, or is this a new problem, or new deployment routine (new routine meaning there's really no baseline of this ever working in the past) – MDMoore313 – 2014-05-01T17:21:59.450@BigHomie Brand new routine...so new, I just encountered this problem while writing it. It's really a simple batch file with
net use
androbocopy
commands. – Nathan C – 2014-05-01T17:24:12.970that runs at login? Located in a group policy, or Windows startup folder? Can you use powershell instead? – MDMoore313 – 2014-05-01T17:25:11.500
@BigHomie I run it manually after I do a build in visual studio. There's plenty of other methods I could use, but I chose this way.
Remove-PSDrive T
returns no errors, but the drive still persists. – Nathan C – 2014-05-01T17:27:17.427