Guest Marc S Posted February 5, 2008 Posted February 5, 2008 I am running a basic Login script in Sysvol to map a few mapped drives thru the Net use: \\server\folder /persistent:yes command. After the first logon, the next consecutive logons give me System error 85 has occurred. The local device is already in use. The mapped drive is there, but there is an error in the script. Is there a better way to re-map drives on each Logon?
Guest Ace Fekay [MVP] Posted February 5, 2008 Posted February 5, 2008 Re: Login Script - System error 85 In news:48A3093A-E8DE-4200-918C-EC9E5E0BEDEF@microsoft.com, Marc S <MarcS@discussions.microsoft.com> typed: > I am running a basic Login script in Sysvol to map a few mapped > drives thru the Net use: \\server\folder /persistent:yes command. > > After the first logon, the next consecutive logons give me System > error 85 has occurred. The local device is already in use. The > mapped drive is there, but there is an error in the script. > > Is there a better way to re-map drives on each Logon? What I did in situations with such a script, and is good practice, is to delete all drives before mapping them to eliminate this error. This also deletes mappings the users may have deleted the necessary share and mapped anothe ron the same letter. This ensures all users get the proper mappings whenever they logon. net use d: /delete net use e: /delete etc. net use d: \\server\share1 net use e: \\server\share2 -- Regards, Ace This posting is provided "AS-IS" with no warranties or guarantees and confers no rights. Ace Fekay, MCSE 2003 & 2000, MCSA 2003 & 2000, MCSE+I, MCT, MVP Microsoft MVP - Directory Services Microsoft Certified Trainer Infinite Diversities in Infinite Combinations
Guest Richard Mueller [MVP] Posted February 5, 2008 Posted February 5, 2008 Re: Login Script - System error 85 "Ace Fekay [MVP]" <PleaseAskMe@SomeDomain.com> wrote in message news:OPzLJT7ZIHA.208@TK2MSFTNGP02.phx.gbl... > In news:48A3093A-E8DE-4200-918C-EC9E5E0BEDEF@microsoft.com, > Marc S <MarcS@discussions.microsoft.com> typed: >> I am running a basic Login script in Sysvol to map a few mapped >> drives thru the Net use: \\server\folder /persistent:yes command. >> >> After the first logon, the next consecutive logons give me System >> error 85 has occurred. The local device is already in use. The >> mapped drive is there, but there is an error in the script. >> >> Is there a better way to re-map drives on each Logon? > > What I did in situations with such a script, and is good practice, is to > delete all drives before mapping them to eliminate this error. This also > deletes mappings the users may have deleted the necessary share and mapped > anothe ron the same letter. This ensures all users get the proper > mappings whenever they logon. > > net use d: /delete > net use e: /delete > etc. > net use d: \\server\share1 > net use e: \\server\share2 > > > -- > Regards, > Ace > > This posting is provided "AS-IS" with no warranties or guarantees and > confers no rights. > > Ace Fekay, MCSE 2003 & 2000, MCSA 2003 & 2000, MCSE+I, MCT, > MVP Microsoft MVP - Directory Services > Microsoft Certified Trainer > > Infinite Diversities in Infinite Combinations > I don't use the persistent option when I map drives in a logon script. That may be causing the error. -- Richard Mueller Microsoft MVP Scripting and ADSI Hilltop Lab - http://www.rlmueller.net --
Guest Ace Fekay [MVP] Posted February 5, 2008 Posted February 5, 2008 Re: Login Script - System error 85 In news:%23ectkW7ZIHA.1960@TK2MSFTNGP02.phx.gbl, Richard Mueller [MVP] <rlmueller-nospam@ameritech.nospam.net> typed: > > I don't use the persistent option when I map drives in a logon > script. That may be causing the error. > > -- > Richard Mueller > Microsoft MVP Scripting and ADSI > Hilltop Lab - http://www.rlmueller.net Good point, Richard. I don't either. No need especially if deleting them anyway before re-mapping them Ace
Guest Marc S Posted February 5, 2008 Posted February 5, 2008 Re: Login Script - System error 85 So, is it good practice to use both suggestions: 1. First delete the "specific mapped drives first" net use e: /delete 2. Can you use the Persistent command "without" adding Yes or NO. Net use: \\server\folder /persistent OR Just don't even include the Persistent command Net use: \\server\folder "Ace Fekay [MVP]" wrote: > In news:%23ectkW7ZIHA.1960@TK2MSFTNGP02.phx.gbl, > Richard Mueller [MVP] <rlmueller-nospam@ameritech.nospam.net> typed: > > > > I don't use the persistent option when I map drives in a logon > > script. That may be causing the error. > > > > -- > > Richard Mueller > > Microsoft MVP Scripting and ADSI > > Hilltop Lab - http://www.rlmueller.net > > Good point, Richard. I don't either. No need especially if deleting them > anyway before re-mapping them > > Ace > > > >
Guest Richard Mueller [MVP] Posted February 5, 2008 Posted February 5, 2008 Re: Login Script - System error 85 The default is for the mapping to not be persistent, so don't include it in the command. I would suggest either first remove all drive mappings, or (in VBScript) trap the possible error when you map drives. If the mapping fails, remove the drive and try again. That cannot be done in a batch file, so to be save use the /delete. -- Richard Mueller Microsoft MVP Scripting and ADSI Hilltop Lab - http://www.rlmueller.net -- "Marc S" <MarcS@discussions.microsoft.com> wrote in message news:974B1761-04E1-4647-9F4C-2D76C57D5886@microsoft.com... > So, is it good practice to use both suggestions: > 1. First delete the "specific mapped drives first" > net use e: /delete > > 2. Can you use the Persistent command "without" adding Yes or NO. > Net use: \\server\folder /persistent > OR > Just don't even include the Persistent command > Net use: \\server\folder > > "Ace Fekay [MVP]" wrote: > >> In news:%23ectkW7ZIHA.1960@TK2MSFTNGP02.phx.gbl, >> Richard Mueller [MVP] <rlmueller-nospam@ameritech.nospam.net> typed: >> > >> > I don't use the persistent option when I map drives in a logon >> > script. That may be causing the error. >> > >> > -- >> > Richard Mueller >> > Microsoft MVP Scripting and ADSI >> > Hilltop Lab - http://www.rlmueller.net >> >> Good point, Richard. I don't either. No need especially if deleting them >> anyway before re-mapping them >> >> Ace >> > >> >> >>
Guest Marc S Posted February 7, 2008 Posted February 7, 2008 Re: Login Script - System error 85 "Richard Mueller [MVP]" wrote: > The default is for the mapping to not be persistent, so don't include it in > the command. I would suggest either first remove all drive mappings, or (in > VBScript) trap the possible error when you map drives. If the mapping fails, > remove the drive and try again. That cannot be done in a batch file, so to > be save use the /delete. > > -- > Richard Mueller > Microsoft MVP Scripting and ADSI > Hilltop Lab - http://www.rlmueller.net > -- > > "Marc S" <MarcS@discussions.microsoft.com> wrote in message > news:974B1761-04E1-4647-9F4C-2D76C57D5886@microsoft.com... > > So, is it good practice to use both suggestions: > > 1. First delete the "specific mapped drives first" > > net use e: /delete > > > > 2. Can you use the Persistent command "without" adding Yes or NO. > > Net use: \\server\folder /persistent > > OR > > Just don't even include the Persistent command > > Net use: \\server\folder > > > > "Ace Fekay [MVP]" wrote: > > > >> In news:%23ectkW7ZIHA.1960@TK2MSFTNGP02.phx.gbl, > >> Richard Mueller [MVP] <rlmueller-nospam@ameritech.nospam.net> typed: > >> > > >> > I don't use the persistent option when I map drives in a logon > >> > script. That may be causing the error. > >> > > >> > -- > >> > Richard Mueller > >> > Microsoft MVP Scripting and ADSI > >> > Hilltop Lab - http://www.rlmueller.net > >> > >> Good point, Richard. I don't either. No need especially if deleting them > >> anyway before re-mapping them > >> > >> Ace > >> > >> After some further testing of the Logon Script using deleting mapped drives, and removing the persistent, I had intermittant issues. The script would stop and prompt to click Yes to delete one of the mapped drives. Not sure why this occurred, but I don't want my users to go thru this. If I don't add the delete mapped drives, and leave the persistant mapped drives in the Logon Script...then the user gets the Login Script - System error 85 ONLY when the drives are already mapped. Is it any harm to just leave that alone? The error doesn't seem to hurt anything. If the drives get deleted manually, at least the logon script will re-add them.
Guest Ace Fekay [MVP] Posted February 10, 2008 Posted February 10, 2008 Re: Login Script - System error 85 In news:592C6466-D43D-4A06-AEB9-DB16E38C9AA8@microsoft.com, Marc S <MarcS@discussions.microsoft.com> typed: > After some further testing of the Logon Script using deleting mapped > drives, and removing the persistent, I had intermittant issues. The > script would stop and prompt to click Yes to delete one of the mapped > drives. Not sure why this occurred, but I don't want my users to go > thru this. > > If I don't add the delete mapped drives, and leave the persistant > mapped drives in the Logon Script...then the user gets the Login > Script - System error 85 ONLY when the drives are already mapped. > > Is it any harm to just leave that alone? The error doesn't seem to > hurt anything. If the drives get deleted manually, at least the logon > script will re-add them. If the users are getting prompted with a question, it may mean the drive still exists and they are being prompted to map it anyway, or there is an open IPC session with the machine, such as a current open folder. Maybe it is a drive they have manually mapped. Are you deleting ALL drives in your script? I had to in one case, set delete statements for drives from F: to Z: for this one client to make the script work. They had drives mapped all over the place. Forget the persisitent switch. That is like checking the box when manually mapping a drive to map it every time you logon. Ace
Recommended Posts