oh, and don't forget the quotes.... :-) On Mon, Aug 20, 2012 at 5:00 PM, Jeff Bunting <[email protected]>wrote:
> Try setting the force option to true. > > WshNetwork.RemoveNetworkDrive "Z:" , true > > see > http://ss64.com/vb/driverm.html > > Jeff > > > On Mon, Aug 20, 2012 at 3:52 PM, Kennedy, Jim < > [email protected]> wrote: > >> Running some VB logon scripts for users to map a few drives. Yes I should >> be using GPP. XP has always been a pain when changing an existing mapped >> drive, the old ones just don't go away and the new one does not overwrite >> them. >> >> >> Set WshNetwork = WScript.CreateObject("WScript.Network") >> WshNetwork.RemoveNetworkDrive "Z:" >> WshNetwork.MapNetworkDrive "Z:", "\\Server\PublicFiles" >> >> >> The Z drive won't hit \\server\PublicFiles it will still be point at the >> old location. Any empty drives that I map show up fine, lots of other >> stuff in the script that is working. However if I hit a command prompt and >> type net use t: /delete and then reboot everything is fine. There is a >> very good possibility that before my time this mapping in question was >> created with >> >> net use t: \\share /persistent:yes >> >> in a bat file. >> >> ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ >> ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~ >> >> --- >> To manage subscriptions click here: >> http://lyris.sunbelt-software.com/read/my_forums/ >> or send an email to [email protected] >> with the body: unsubscribe ntsysadmin >> >> > ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to [email protected] with the body: unsubscribe ntsysadmin
