|
|
|||||||
Hi All! Ok i'm new so be gentle. I'm also new to Kixtart scripting. I'm needing a script that will check for the users group(InGroup no problem) and map drive(s) accordingly. Right now I use the Select Case InGroup("\\RDC\GroupName") Use K: /del Use K: "\\Server\Folder" Case 1 ;No Drive K for you EndSelect Select Case InGroup("\\RDC\GroupName2") Use H: /del Use H: "\\Server\Folder2" Case 1 ;No Drive H for you EndSelect Problem is the user may belong to both group K & H and need both drives mapped. This is the only way I have figured out to make it work. Is there a better way to check and map drives for my users that may need multiple drives mapped? Thanks. |
||||||||
|
|
|||||||
Search the board for elaborate solutions which use INI files for mapping, but depending on how your groups are structured one of these should fit: Code: Use K: /DELETE OR Code: Use K: /DELETE |
||||||||
|
|
|||||||
Thanks |
||||||||
|
|
|||||||
Please read the KiXtart Manual with regards to the differences between IF-ELSE-ENDIF and SELECT-CASE-ENDSELECT. |
||||||||
|
|
|||||||
Thanks sealeopard. Can someone explain why I'm not having any luck removing an existing mapped drive via my script? I have switched servers and am trying to remap the users mapped drive(Drive K) to the new server. The Use K: /Del or /DELETE does not remove their presently mapped drive so the Use K: "\\server\folder" does not work. It works fine as long as they don't have a K drive mapped. Thanks. |
||||||||
|
|
|||||||
Try using the "/persistent" switch on the deletes. |
||||||||
|
|
|||||||
Persistently mapped drives need to be deleted via the /PERSISTENT switch. It's a best practice to alwasy use the /PERSISTENT switch when deleting drive mappings. See the KiXtart Manual under USE. Code:
|
||||||||
|
|
|||||||
Thanks again. you guys rock. It worked great. |