Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

KIX script: map drive based on OU membership

Posted on 2008-06-11
3
2,652 Views
Last Modified: 2012-06-22
I am trying to convert our current vbs login script to kix script.

The script maps a drive based on OU membership, eg:
===============================
select case LCase (oParent.name)
     case "ou=execs"
      oNet.RemoveNetworkDrive "S:"
      oNet.MapNetworkDrive "S:", "\\CORPFS01\Execs$"
end select
==============================

I want to do the same thing with KIX, but am having no luck in getting the IF inOU("Execs") variable working.

Is there a simple way to do this?


Mapping drives via group memberships is working fine by using
IF InGroup("groupname") =1
   use f: \\corpfs01\fileshare
ENDIF

What am I missing???????
0
Comment
Question by:davewhy
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
Isorg earned 500 total points
ID: 21764260
in kix there is no InOU() command.

but there is a really nice InContainer() UDF that can be found here.  http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=82433&site_id=1#import
0
 

Author Comment

by:davewhy
ID: 21764557
Thankyou Isorg.  I shall setup the UDF and try to call from the script.  Any tips?

0
 

Author Comment

by:davewhy
ID: 21767824
Isorg, the InContainer() and dependent TranslateName() UDF's worked a treat.  I have included both in a seperate UDF (.kxf) file, called them from the script, and got the result I wanted.  Brilliant.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
This article will show, step by step, how to integrate R code into a R Sweave document
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question