Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Login Script - System error 85 has occurred

Status
Not open for further replies.

dtorres

MIS
Sep 25, 2002
177
US
This seems to be realted because the drive that it is attempting to map is already mapped. Is there something I can add to the script to prevent this error from coming up.

"System error 85 has occurred"
"The local device name is already in use."

Thank You

"D"
 
Two ways
at the beginning of the script you can use
net use * /delete
that will clear all your mappings.
or
in the script you can add the switch /persistant:no to each drive that you map.
That will disconnect each drive when you log off.
 
Ok, awesome.

One other thing, is this the correct script to add when wanting to delete temp files in a directory?

del c:\temp\*.* /f /q

For some reason on XP, it isn't running.
 
On win2k and winxp the temp file is usually found in C:\Documents and Settings\username\Local Settings\Temp.
I'm not sure how you would be able to clear that with a login script.
 
The command is right, but the path is wrong. WBG34 is on the right track. The only thing that you need to do is use the path C:\Documents and Settings\%username%\Local settings\temp. That will make the script look at the username of the person logging in and delete only his/her temp files. Hope it helps. Brian
USAF
Network +, Win2k Pro
 
Yep, that worked fine...I pasted the wrong path in my post....though when I added the /persistant:no, I still was getting the:

"System error 85 has occurred"
"The local device name is already in use."
 
Also the del c:\temp\*.* will deleted files, but what about folders? Any way to have those deleted by a similar script?
 
what that means is that the drive letter you are trying to map to is already in use.

Thanks,
James
[shadeshappy] [evil]
 
You can use the command deltree to delete folders. I would be extremely careful with this though. Make sure that you're not deleting program or systems folders when you use this, or you'll end up with a mess on your hands.



Brian
USAF
Network +, Win2k Pro
No try not. Do or do not. --Yoda
[yoda]
 
For command-line switches to work, they must be spelled correctly:

/persistent:no

Good Luck!



Tim
Certified AND Qualified
[thumbsup2]
 
A vb script file can also do it. It can also read the registry and can get what the exact path is temp files, temp inet files, etc. This way you would be deleteing all of the temp stuff, not just what is in c:\temp (which is almost nothing for nt users). This could give the flexability to use it on most systems.

Thanks,
James
[shadeshappy] [evil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top