Andie Posted October 2, 2008 Posted October 2, 2008 Hi, I am not very experienced in scripting, and this part of a vbs logon script (below) was written by IT providers (sadly no longer with us). I have two questions: 1. I would like to add two more mapped drives. Can I just add to the script using the existing syntax on each section and increasing the drive letter and remote path numbers? Eg. DriveLetter2 = "P:" 2. In the user's profile, we connect S: to the path for the user home folder. This path name is \\servername\LNM Data\User Data\Students\%USERNAME%. We also have folder redirection set up in GP. Do we still need the bit below that seems to be mapping S: to something different? If so, should I correct the path, or is this doing something different? Does this map a home folder if none is in the profile? '*********************** ' Drive Map Sub-routine '*********************** Sub MapDrives On Error Resume Next 'DriveLetter0 = "S:" DriveLetter1 = "R:" 'RemotePath0 = "\\servername\%USERNAME%" RemotePath1 = "\\servername\Resources$" 'objNetwork.MapNetworkDrive DriveLetter0, RemotePath0 objNetwork.MapNetworkDrive DriveLetter1, RemotePath1 End Sub Thanks.
FN-GM Posted October 2, 2008 Posted October 2, 2008 hi its just as simple as putting another line in like you said you might as well take the map drive for s: out. It has a ' in front this means its ignored by the script your new script will look like '*********************** ' Drive Map Sub-routine '*********************** Sub MapDrives On Error Resume Next DriveLetter0 = "P:" DriveLetter1 = "R:" RemotePath0 = "\\servername\share" RemotePath1 = "\\servername\Resources$" 'objNetwork.MapNetworkDrive DriveLetter0, RemotePath0 objNetwork.MapNetworkDrive DriveLetter1, RemotePath1 End Sub 1
Andie Posted October 6, 2008 Author Posted October 6, 2008 hi its just as simple as putting another line in like you said you might as well take the map drive for s: out. It has a ' in front this means its ignored by the script your new script will look like '*********************** ' Drive Map Sub-routine '*********************** Sub MapDrives On Error Resume Next DriveLetter0 = "P:" DriveLetter1 = "R:" RemotePath0 = "\\servername\share" RemotePath1 = "\\servername\Resources$" 'objNetwork.MapNetworkDrive DriveLetter0, RemotePath0 objNetwork.MapNetworkDrive DriveLetter1, RemotePath1 End Sub Except, I would need to remove that single quote ' from the objNetwork line, yes?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now