login script to remove mapped drives



I have a login script that maps some drives and copies some files. It works
great.

I have some users that have mapped some drives to locations on the network
that no longer exist. I want to delete the mappings as the login script
remaps them properly. The delete does not work from within the login script
but it works if manually typed on the client at the cmd prompt.

I am using:

NET USE X: /DELETE /YES to delete the persistent mapping. (I also tried
without the /YES)

If in my login script, the X: drive does not delete - although in the same
login script I map a U: drive which maps ok so I know the script is being
called and functional.

If I go to the client and do type the the /delete at the cmd prompt - the X:
drive gets deleted properly.

If I put the login script on the client desktop and run it there, the X
drive does not delete. I do not get a "command completed successfully" -
however I do not get an error either.

Any thoughts?

thanks


.



Relevant Pages

  • Re: Slow opening of files
    ... administrator account saw that it had the SBS login script in the profile - ... You shouldn't be mapping drives on the server at all - no login script ... Also, the ipconfig /all from the server & a client, just in case. ...
    (microsoft.public.windows.server.sbs)
  • Re: Login Script - Drive Mapping
    ... the login script in the NetLogon folder, and they are all the same. ... We map 5 to 6 drives with this script. ... their profile, that no drives map....so it is not a persistent issue. ... I would still explicitly delete the T: map to make sure it is clear. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Login Script - Drive Mapping
    ... It is also not a PC authentication issue, as 99% of the login script works. ... We map 5 to 6 drives with this script. ... So on their home machine, I deleted their profile, and had them login....and ...
    (microsoft.public.windows.server.active_directory)
  • MapNetworkDrive, can I map without a share?
    ... How do I map a network drive when there is no share name? ... I am now working on a unified login script for all ... office and will map drives to the current office. ... office's iShared \ a server in the remote office \ the desired path on ...
    (microsoft.public.scripting.wsh)
  • Re: Im loosing my mapped drives
    ... I just wrote a login script that authenticates me against my server, ... >> After a complete reinstallation of MCE2005 I cannot map networked drives ...
    (microsoft.public.windows.mediacenter)

Loading