Re: using VBAS login script
- From: "SJMP" <sjmp@xxxxxxxxxxxxxxxx>
- Date: Wed, 1 Aug 2007 14:08:13 -0400
Here is the script I am using, but I am getting errors on login:
' Example of VBScript Mapping two drives in one script.
' Author Guy Thomas http://computerperformance.co.uk/
' Version 1.6 - April 24th 2005
' -----------------------------------------------------------------'
Option Explicit
Dim objNetwork, strRemotePath1, strRemotePath2, strRemotePath3, strRemotePath4, strRemotePath5
Dim strDriveLetter1, strDriveLetter2, strDriveLetter3, strDriveLetter4, strDriveLetter5
strDriveLetter1 = "H:"
strDriveLetter2 = "G:"
strDriveLetter3 = "S:"
strDriveLetter4 = "T:"
strDriveLetter5 = "U:"
strRemotePath1 = "\\server\Data"
strRemotePath2 = "\\server\users\%username%"
strRemotePath3 = "\\server\Shared"
strRemotePath4 = \\server\folder"
strRemotePath5 = \\server\folder2"
Set objNetwork = CreateObject("WScript.Network")
' Section which maps, H: G: S: T: and U:
objNetwork.MapNetworkDrive strDriveLetter1, strRemotePath1
objNetwork.MapNetworkDrive strDriveLetter2, strRemotePath2
objNetwork.MapNetworkDrive strDriveLetter3, strRemotePath3
objNetwork.MapNetworkDrive strDriveLetter4, strRemotePath4
objNetwork.MapNetworkDrive strDriveLetter5, strRemotePath5
' Extra code just to add a message box
WScript.Echo "Map drives " & strDriveLetter1 & " & " & strDriveLetter2
Wscript.Quit
' End of Windows Logon Script Example
.
- References:
- using VBAS login script
- From: SJMP
- using VBAS login script
- Prev by Date: Re: No DC in Active Directory
- Next by Date: Re: Maximum length of user names?
- Previous by thread: using VBAS login script
- Next by thread: Re: using VBAS login script
- Index(es):
Relevant Pages
|
Loading