+ Post New Thread
Results 1 to 13 of 13
Windows Thread, Unmapping Mapped Drives in Technical; Hi Is there a way in a logon bat script to un-map mapped drives that have are to be mapped ...
  1. #1
    Grommit's Avatar
    Join Date
    Sep 2006
    Location
    Weston-super-Mare
    Posts
    1,335
    Thank Post
    31
    Thanked 54 Times in 31 Posts
    Rep Power
    24

    Unmapping Mapped Drives

    Hi

    Is there a way in a logon bat script to un-map mapped drives that have are to be mapped in the script later on ?

    Bit like Con2prt deleting all printers and then adding them.?

  2. #2

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,374
    Thank Post
    625
    Thanked 951 Times in 653 Posts
    Blog Entries
    2
    Rep Power
    318

    Re: Unmapping Mapped Drives

    Code:
    net use * /delete /yes

  3. #3
    Grommit's Avatar
    Join Date
    Sep 2006
    Location
    Weston-super-Mare
    Posts
    1,335
    Thank Post
    31
    Thanked 54 Times in 31 Posts
    Rep Power
    24

    Re: Unmapping Mapped Drives

    Quote Originally Posted by webman
    Code:
    net use * /delete /yes
    So this would go at the start of the script ... and then the mappings further down ?

  4. #4

    Join Date
    Jan 2007
    Location
    Durham, UK
    Posts
    328
    Thank Post
    33
    Thanked 17 Times in 12 Posts
    Rep Power
    19

    Re: Unmapping Mapped Drives

    Yes the script that webman gave you would go at the top this would delete any network drives already mapped, then you would put the drives to map at the bottom of the script

  5. #5
    Grommit's Avatar
    Join Date
    Sep 2006
    Location
    Weston-super-Mare
    Posts
    1,335
    Thank Post
    31
    Thanked 54 Times in 31 Posts
    Rep Power
    24

    Re: Unmapping Mapped Drives

    Quote Originally Posted by Jackd
    Yes the script that webman gave you would go at the top this would delete any network drives already mapped, then you would put the drives to map at the bottom of the script
    Did that


    net use * /delete /yes

    time server

    net use W: \\SERVERNAME\FOLDER
    net use X: \\SERVERNAME\FOLDER1

    I run this scrpit and when the user logs on there is no Drives except c and d... heh heh








    net use f: /delete /y

  6. #6

    Join Date
    Sep 2005
    Location
    Leicester, UK
    Posts
    123
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Unmapping Mapped Drives

    Do they have permissions with the shares? Have you tried running the batch script once they are logged on?

  7. #7
    Grommit's Avatar
    Join Date
    Sep 2006
    Location
    Weston-super-Mare
    Posts
    1,335
    Thank Post
    31
    Thanked 54 Times in 31 Posts
    Rep Power
    24
    Quote Originally Posted by Grommit View Post
    Did that


    net use * /delete /yes

    time server

    net use W: \\SERVERNAME\FOLDER
    net use X: \\SERVERNAME\FOLDER1

    I run this scrpit and when the user logs on there is no Drives except c and d... heh heh








    net use f: /delete /y
    Well it sorta worked... used this command and it removed the mappings...

    BUT the mappings that shold have been thare and were is the script were not there ... my computer was empty! any ideas ?

    (Yes I did leave the mappings in unsed the delete line)

  8. #8

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,374
    Thank Post
    625
    Thanked 951 Times in 653 Posts
    Blog Entries
    2
    Rep Power
    318
    "time server" is not a command. Should that be this?

    net time \\server /set /yes

  9. #9

    Join Date
    Mar 2007
    Posts
    307
    Thank Post
    3
    Thanked 9 Times in 8 Posts
    Rep Power
    16
    Permissoins? Although I assume that if this was altering an existing script that all the drives where showing before?

  10. #10
    Ryan's Avatar
    Join Date
    Jan 2008
    Location
    Scotland
    Posts
    537
    Thank Post
    12
    Thanked 16 Times in 15 Posts
    Blog Entries
    1
    Rep Power
    28
    @webman & Grommit

    Yup,
    net time \\servername /set /y

  11. #11
    apeo's Avatar
    Join Date
    Sep 2005
    Location
    Lost
    Posts
    1,612
    Thank Post
    95
    Thanked 115 Times in 111 Posts
    Rep Power
    41
    Time command will halt the script as all it will ask for the new time.

  12. #12
    Grommit's Avatar
    Join Date
    Sep 2006
    Location
    Weston-super-Mare
    Posts
    1,335
    Thank Post
    31
    Thanked 54 Times in 31 Posts
    Rep Power
    24
    Quote Originally Posted by webman View Post
    "time server" is not a command. Should that be this?

    net time \\server /set /yes
    Ja Ja... I know... it was just here to show the lines :-)

  13. #13
    apeo's Avatar
    Join Date
    Sep 2005
    Location
    Lost
    Posts
    1,612
    Thank Post
    95
    Thanked 115 Times in 111 Posts
    Rep Power
    41
    Quote Originally Posted by Grommit View Post
    Ja Ja... I know... it was just here to show the lines :-)
    So have you fixed the problem then?

SHARE:
+ Post New Thread

Similar Threads

  1. Hide mapped network drives
    By timbo343 in forum Windows
    Replies: 11
    Last Post: 2nd April 2012, 09:06 AM
  2. Slow mapped drives.
    By proby1 in forum Windows Vista
    Replies: 2
    Last Post: 15th November 2007, 10:39 AM
  3. SuccessMaker Mapped Drives
    By marco84 in forum Educational Software
    Replies: 11
    Last Post: 8th June 2007, 11:21 AM
  4. Replies: 5
    Last Post: 25th January 2007, 11:22 PM
  5. Replies: 4
    Last Post: 7th December 2005, 08:09 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •