Mapped Network Drive won't unmap

R

ragnarok89

Hi everyone,

I really hope someone can help me with this... I have 2 computers on
a network, CPU-1 is a win2k server that is a domain controller; PCU-2
is an XP Pro SP2 pc that is part of a workgroup.

Once a day, I want to connect to the "Q" folder (network share) on
CPU-2 from CPU-1, and count the number of directories inside the "Q"
directory. Since CPU-2 is not part of the domain, CPU-1 will require a
username and password to be set up on CPU-2. So I created the user
named "bak" with a password "auto" on CPU-2. "bak" is a member of the
administrators group on CPU-2.

To automate the process, I wrote a PHP script:

exec("net use m: \\\\CPU-2\\count auto /user:CPU-2\\bak");
exec("dir m:\\recordings > folderlist.txt");
exec("net use m: /delete");

I made a PHP script to do this because I want to contents of
folderlist.txt to be displayed on a webpage. For 24 hours, this worked
well. FYI, when the PHP script runs, the tasklist shows CMD.EXE being
executed by IWAM_CPU-1, which is the Built-in account for Internet
Information Services to start out of process applications.

Today, when I loaded my webpage, it didn't work. Here is what I have
found on CPU-1:

When I open windows explorer, I see drive M: listed as "Network Drive
(M:)", there is no path listed. Also, there is a little red x on the
drive icon. When I double click on the drive, I get an error: "M: is
not accessible. Access Denied." When I right click on the icon, and
select Disconnect, I get the error: "The network connection could not
be found."

These two error messages contradict each other. So I opened up a DOS
window, ran the net use command, and saw this:

Status Local Remote Network
--------------------------------------------------------------------------------------------------
OK \\CPU-2\count Microsoft Windows
Network

The network drive has no letter!

So then I read everthing I could find on Google Groups, but nothing has
worked. Other things that I have tried:

Ran regedit on CPU-1 and removed all entries referring to drive M or
CPU-2

ran the command "net use m: \\CPU-2\count auto /user:CPU-2\bak" in a
DOS window on CPU-1, which gives me System error 85: The local device
name is already in use.

ran the command "net use m: /delete /yes" in a DOS window on CPU-1,
which gives me the error: The network connection could not be found.

unshared the "count" folder on CPU-2 and re-shared it

deleted and recreated the user "bak" on CPU-2 with the same password

deleted and recreated the user "bak" on CPU-2 with a different
password, and modified my PHP script accordingly

created a new user with a new password on CPU-2, and modified my PHP
script accordingly


I'm stuck. The only thing I have not done is reboot either of the PCs,
because they run critical apps on my network. I'm at my wit's end. What
I don't understand is that everything worked fine for a day!
Any ideas, any suggestions, please!

Al
 
D

Dave Patrick

You may need to restart to end the confusion, but before you do;

net use /persistent:no
net use * /delete /y


--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Hi everyone,
|
| I really hope someone can help me with this... I have 2 computers on
| a network, CPU-1 is a win2k server that is a domain controller; PCU-2
| is an XP Pro SP2 pc that is part of a workgroup.
|
| Once a day, I want to connect to the "Q" folder (network share) on
| CPU-2 from CPU-1, and count the number of directories inside the "Q"
| directory. Since CPU-2 is not part of the domain, CPU-1 will require a
| username and password to be set up on CPU-2. So I created the user
| named "bak" with a password "auto" on CPU-2. "bak" is a member of the
| administrators group on CPU-2.
|
| To automate the process, I wrote a PHP script:
|
| exec("net use m: \\\\CPU-2\\count auto /user:CPU-2\\bak");
| exec("dir m:\\recordings > folderlist.txt");
| exec("net use m: /delete");
|
| I made a PHP script to do this because I want to contents of
| folderlist.txt to be displayed on a webpage. For 24 hours, this worked
| well. FYI, when the PHP script runs, the tasklist shows CMD.EXE being
| executed by IWAM_CPU-1, which is the Built-in account for Internet
| Information Services to start out of process applications.
|
| Today, when I loaded my webpage, it didn't work. Here is what I have
| found on CPU-1:
|
| When I open windows explorer, I see drive M: listed as "Network Drive
| (M:)", there is no path listed. Also, there is a little red x on the
| drive icon. When I double click on the drive, I get an error: "M: is
| not accessible. Access Denied." When I right click on the icon, and
| select Disconnect, I get the error: "The network connection could not
| be found."
|
| These two error messages contradict each other. So I opened up a DOS
| window, ran the net use command, and saw this:
|
| Status Local Remote Network
| --------------------------------------------------------------------------------------------------
| OK \\CPU-2\count Microsoft Windows
| Network
|
| The network drive has no letter!
|
| So then I read everthing I could find on Google Groups, but nothing has
| worked. Other things that I have tried:
|
| Ran regedit on CPU-1 and removed all entries referring to drive M or
| CPU-2
|
| ran the command "net use m: \\CPU-2\count auto /user:CPU-2\bak" in a
| DOS window on CPU-1, which gives me System error 85: The local device
| name is already in use.
|
| ran the command "net use m: /delete /yes" in a DOS window on CPU-1,
| which gives me the error: The network connection could not be found.
|
| unshared the "count" folder on CPU-2 and re-shared it
|
| deleted and recreated the user "bak" on CPU-2 with the same password
|
| deleted and recreated the user "bak" on CPU-2 with a different
| password, and modified my PHP script accordingly
|
| created a new user with a new password on CPU-2, and modified my PHP
| script accordingly
|
|
| I'm stuck. The only thing I have not done is reboot either of the PCs,
| because they run critical apps on my network. I'm at my wit's end. What
| I don't understand is that everything worked fine for a day!
| Any ideas, any suggestions, please!
|
| Al
|
 
M

Marc Kupper

I really hope someone can help me with this... I have 2 computers on
a network, CPU-1 is a win2k server that is a domain controller; PCU-2
is an XP Pro SP2 pc that is part of a workgroup.

Once a day, I want to connect to the "Q" folder (network share) on
CPU-2 from CPU-1, and count the number of directories inside the "Q"
directory. Since CPU-2 is not part of the domain, CPU-1 will require a
username and password to be set up on CPU-2. So I created the user
named "bak" with a password "auto" on CPU-2. "bak" is a member of the
administrators group on CPU-2.

To automate the process, I wrote a PHP script:

exec("net use m: \\\\CPU-2\\count auto /user:CPU-2\\bak");
exec("dir m:\\recordings > folderlist.txt");
exec("net use m: /delete");

I do similar things and as a sanity check my first line is "net use /d
m:"
Normally this will fail as there is no drive M: connection but it will
be
handy should there be a connection leftover from the previous time
the script was run.

You might need to add "net use /d \\CPU-2\count" too which will
get rid of the connection with no drive letter.

Marc
 
R

ragnarok89

You might need to add "net use /d \\CPU-2\count" too which will
get rid of the connection with no drive letter.

Marc


Wow, that got rid of the listing in the output of the Net Use command.
Thanks.

Now, if I can just get rid of it in Windows explorer....

Al
 
M

Marc Kupper

ragnarok89 said:
Wow, that got rid of the listing in the output of the Net Use command.

Now, if I can just get rid of it in Windows explorer....

You must have a folder shortcut in your "Network Neighborhood."
The easiest way to get rid of these is from Windows Explorer.
* Go "My Network Places"
* Right click on "count on CPU2", select Properties, and verify
that the type is "Folder Shortcut." Hit [Ok] or [Cancel].
* Right click on "count on CPU2" again, select Delete, and confirm
it.
* This is also a good time to get rid of things like "My Web Sites
on MSN" if you are not using them.
* Start up a command prompt and type "Net use" - I suspect
\\CPU2\count will be back and so delete that using
"net use /d \\CPU2\count"

If you look in \Documents and Settings\LoginName\NetHood from a
Command Prompt you'll see a sub-folder named "count on CPU2"
which contains a single file, target.lnk. I'm not sure how/when
these get created but it happens automatically.

Marc
 
R

ragnarok89

You must have a folder shortcut in your "Network Neighborhood."
The easiest way to get rid of these is from Windows Explorer.
* Go "My Network Places"
* Right click on "count on CPU2", select Properties, and verify
that the type is "Folder Shortcut." Hit [Ok] or [Cancel].
* Right click on "count on CPU2" again, select Delete, and confirm
it.
If you look in \Documents and Settings\LoginName\NetHood from a
Command Prompt you'll see a sub-folder named "count on CPU2"
which contains a single file, target.lnk. I'm not sure how/when
these get created but it happens automatically.

Marc

Marc,

I really appreciate the help. Sadly, there is no mention of drive M or
CPU2 in My Network Places, nor is there a folder in Nethood that refers
to CPU2 (or drive M). Any other suggestions?

Al
 
M

Marc Kupper

Al said:
I really appreciate the help. Sadly, there is no mention of drive M or
CPU2 in My Network Places, nor is there a folder in Nethood that refers
to CPU2 (or drive M). Any other suggestions?

Al, you had written earlier
Now, if I can just get rid of it in Windows explorer....

Where and what exactly is the "it" you are trying to get rid of?
Earlier I had explained how to get rid of connections from the "My
Network Places \ Network Neighborhood" section of the folder list in
Windows Explorer. Those tend to show up with no drive letter when you
do "net use" from a command prompt. What shows up now when you do
"Net use" from the command prompt?

Marc
 
R

ragnarok89

Where and what exactly is the "it" you are trying to get rid of?
Earlier I had explained how to get rid of connections from the "My
Network Places \ Network Neighborhood" section of the folder list in
Windows Explorer. Those tend to show up with no drive letter when you
do "net use" from a command prompt. What shows up now when you do
"Net use" from the command prompt?

Marc

Marc,

Sorry about the confusion... As it stands tight now, when I open My
Computer, I see Drive M: (no path listed), and a little red x on the
drive icon. However, this entry does NOT appear in My Network Places \
Network Neighborhood.

In a command prompt, when I run net use, I see a listing:

Status Local Remote Network
--------------------------------------------------------------------------------------------------

Disconnected \\CPU-2\count Microsoft Windows
Network

I can remove this listing with the "net use /d \\CPU-2\count"
command, however, Drive M: still appears under My Computer.

Al
 
J

Jerold Schulman

Marc,

Sorry about the confusion... As it stands tight now, when I open My
Computer, I see Drive M: (no path listed), and a little red x on the
drive icon. However, this entry does NOT appear in My Network Places \
Network Neighborhood.

In a command prompt, when I run net use, I see a listing:

Status Local Remote Network
--------------------------------------------------------------------------------------------------

Disconnected \\CPU-2\count Microsoft Windows
Network

I can remove this listing with the "net use /d \\CPU-2\count"
command, however, Drive M: still appears under My Computer.

Al
Try:

subst M: /d

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com
 
R

ragnarok89

Try:
subst M: /d

it removes the entry from the list prodiced with the net use command,
but M: still shows in My Computer.

Thanks for the help guys, much appreciated. I'm going to stay up late
and just reboot the server around 1 AM.

Al
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top