|
|
|||||||
My company is utilizing Kix scripts in our login scripts to map drives and it has been working fine. We have started to implement DFS namespace and had a strange issue that started when we began to test. The script that we are using: Code: ;Special logic for DFS-n implementation added by Minnie Mouse - April 2022 If exist("\\$NTDataServer\Data01") MapDrive("N:", $NTDataServer, "Data01") ;MapDrive("N:", $NTDataServer, "Data02") MapDrive("R:", domain.net\Global\stuff, "Stuff") ;MapDrive("V:", server.ab.domain.com, "Read") ;Future usage to delete the H: mapped drive that it's useful for $NTDataServer - But it's NOT a Home Folder ;Use H: /Delete /Persistent Return Endif the DFS namespace that works: \\Domain.net\AMER\site\Data01 The DFS namespace that does not work:\\Domain.net\AMER\US\site\Data01 all that we did was to move the site from under US and placed it under AMER and things started to work. The $NTDataServer variable is picked up from the users profile home folder information. I am no programmer and at the end of my knowledge. |
||||||||
|
|
|||||||
MapDrive() is not a built-in function. Can you post which UDF is in your script? This would be something like: Code: Function MapDrive($arg, $arg...) commands... EndFunction Simple/Quick test? Add "@SERROR @CRLF" after each MapDrive() function call to see the error message that's being returned. Glenn |
||||||||
|
|
|||||||
Thanks for replying Glen. I am looking for that as what I posted was a new addition. If you want to see something that Howard did YEARS ago, before my time, here is what he wrote but I do not know how to utilize. Code: ; DFS logic by Howard B 8/30/2010 Dim $DFS, $DFSshare_suffices, $path_parts, $DFSshare_suffixes, $DFSdrives, $counter if instr($Hserver, $Domain) and ( instr($Hserver, "servera")=11 or instr($Hserver, "serverb")=11 ) $path_parts = split($Hserver, "\") $bldg=right($path_parts[1],3) $NTDataServer = join($path_parts, "\", 2) ; these two arrays need to match in number of elements (share to drive letter) ; $DFSshare_suffixes="Apps","Data","Ptemp","EApps","AApps","EData" ; $DFSdrives="L","N","P","R","T","J" $DFSshare_suffixes="Apps","Data","EApps","AApps","EData" $DFSdrives="L","N","R","T","J" for $counter=0 to ubound($DFSshare_suffixes) If exist("\\" +$NTDataServer + "\" + $bldg + $DFSshare_suffixes[$counter]) MapDrive($DFSdrives[$counter]+":", $NTDataServer, $bldg + $DFSshare_suffixes[$counter]) Endif next else Select Case $Hserver="serverfp01" $NTDataServer="serverfp00" $APPServer="serverfp00" Case 1 ; Added by H. B 6/19/2009 if instr($Hserver, "users") > 0 $Hserver=Substr($Hserver,1, instr($Hserver, "users")-2) Endif $NTDataServer=$Hserver $APPServer=$Hserver EndSelect |