Login Script Help - TechRepublic
Question
August 1, 2008 at 10:29 AM
jsizer

Login Script Help

by jsizer . Updated 17 years, 11 months ago

O.k. what I am trying to accomplish is that I delete all mapped drives when the script starts and then map them to a home and common drive and then map the department drives by group membership. I have donwloaded some examples and edited them accordingly. I have them all seperate to see if they work on an individual basis at the moment. What I have an issue with is if I map a drive manually the disconnect won’t work, it tells me the drive doesn’t exist but I SEE IT in My computer. How is is possible that it thinks that it doesn’t exist… Is there a difference between mapping a drive manually and mapping through a VBS? I wouldn’t think that would be different however if I manually disconnect the H and run the script to map it, it appears and then if I run the next script to unmap it disappears…

Any thoughts, suggestions or help is greatly appreciated!

here is the script for disconnecting the drive

Option Explicit
Dim objNetwork, strDriveLetter
strDriveLetter = “H:”
Set objNetwork = CreateObject(“WScript.Network”)
objNetwork.RemoveNetworkDrive strDriveLetter
Wscript.Quit

After further investigation just now I see that it is disconnecting the drive but I want it to delete the mapping complete. I does not do that.

Thanks,

Jennifer

This discussion is locked

All Comments