Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Map drive problem

Status
Not open for further replies.

teddysherri

Technical User
Nov 18, 2003
137
GB
Hi Guys,

We have just created a new share on our 2003 server for the users personal drive. The path is specified in their home folder within AD and as a backup it is in the logon script. The share permissions is to allow everyone change rights, and the NTFS permissions at the top level are to allow list contents and then they have full control to their personal folder.

However when the users logon in the morning, for some reason it is mapping the drive to the top level and bypassing the script and AD. We have exhausted everything we can think of trying and are now very confused.

Can anyone help?

Thank you.
 
I put this together quickly so my xcalcs is somewhat screwed up, will work on that. By the way anyone know what the correct syntax for the xcalcs would be?

Code:
On Error Resume Next
Dim WshShell, WshEnv, objFSO, WshNetwork
Const OverwriteExisting = True

'Configures Variables
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshEnv = WshShell.Environment("Process")
Set WshNetwork = CreateObject("WScript.Network")

Set objSysInfo = CreateObject("ADSystemInfo")
strUser = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUser)

strName = objUser.FullName
wscript.echo strName

strFolderName = "\\server\share$" & "\" & strName
objFSO.CreateFolder strFolderName

wscript.echo strFolderName
intRunError = WshShell.Run("C:\windows\XCACLS.vbs" & strFolderName & "/E /G /SPEC A /P" & chr(34) & strUser & chr(34) & ":F", 2, True)


WshNetwork.MapNetworkDrive "Z:", "\\server\share$" & "\" & strName ,True
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top