Jump to content

Map drive with logon script


Tel

Recommended Posts

Three of my users' Win2000 PC's need a drive mapped on another domain.

As you all know Win2000 can't remember the logon credentials of another domain after a reboot. So what I would like to do is write a logon script that disconnects the current drive and creates a new one with the correct credentials.

Does anybody have any idea on how I can do this, and what the correct code is?

Link to comment
Share on other sites


Or using VBScript ...

DriveLetter = "N:" 'must be capitalized, change drive letter accordingly

RemotePath = "\\server\share"

Set WShNetwork = WScript.CreateObject("WScript.Network")

WShNetwork.MapNetworkDrive DriveLetter, RemotePath

to disconnect use ...

WShNetwork.RemoveNetworkDrive DriveLetter

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...