[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2816
  • Last Modified:

I need a KIX Start Up Script to remove a mapped drive.

Hello there,

Please could someone help with a KIX SCRIPT Login script.

We need to remove the S: drive mapping from user's profiles on our Windows network.

We currently run a KIX Login script so we need to add this solution to the bottom of this one.

Ideally it needs to check to see if the S: drive is already mapped and then reomve it if it is.

Many thanks,

Jono
0
jonojones78
Asked:
jonojones78
  • 3
  • 2
2 Solutions
 
amichaellCommented:
Example to delete a mapped drive (T: in this case):

use t: /delete /persistent
0
 
jonojones78Author Commented:
Any idea how you can test to see if t: exists first?

The whole script ready to use would be good.

Many thanks for your reply,

Jono
0
 
amichaellCommented:
Here's a sample of ours.  We check for domain group membership and then map the drive if the user is a member of the group.  We don't bother determining if the mapping already exists.  So below I'm determining if the user is a member of Domain Users.  If they are (which should be all of our users), then we first delete any currently mapped T: (to ensure it is available) and then map T: to the correct share.



If InGroup ("Domain Users")
      ? "Mapping T:..."
      use t: /delete /persistent
      use t: "$FileServer\transcripts"
      If @ERROR
            "Unsuccessful"
      Else
            "Success!"
      EndIf
EndIf

0
 
jonojones78Author Commented:
Many thanks guys. The Goodgrade was for not having the code to determine if drive is already mapped, but that's fine.
0
 
jonojones78Author Commented:
Cheers guys.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now