marcelodelima
(Lurker)
2007-11-07 05:31 PM
Mapping with IF

Hi,

I need help!!!

I have a kixscript that map network drivers. One mapping is this:

 Code:
Use S: "\\server\" + @userid + "$"


In the cluster, there are two volumes to this mapping:
J:\Novell IB\pessoal and O:\PESSOAL2

Would like to change this map in kixscript to:

 Code:
Use S: "\\server\pessoal\" + @userid
to users folder in J:\Novell IB\pessoal (cluster server)

 Code:
Use S: "\\server\pessoal2\" + @userid
to users folder in O:\PESSOAL2 (cluster server)

How to do this using IF clase in my kix script?

Thanks!!!!!


Mart
(KiX Supporter)
2007-11-07 05:38 PM
Re: Mapping with IF

When do you want to map the drives? I mean what should the If statement be?
Something like this?

 Code:
If InGroup("group1")
	;map some drives
EndIf

If InGroup("group2")
	;map some other drives.
EndIf


marcelodelima
(Lurker)
2007-11-07 06:07 PM
Re: Mapping with IF

Hi Mart,

I want map drivers in startup, because my kix script is the script login.

I can to use "If InGroup" only Security Groups in active directory? or can to reference UNC Path for example:

If InGroup ("\\wcam33\pessoal\”+@userid)
Use S: "\\server\pessoal\" + @userid
Else
If InGroup ("\\wcam33\pessoal2\”+@userid)
Use S: "\\server\pessoal\" + @userid
Endif

Thanks,
Marcelo


Gargoyle
(MM club member)
2007-11-07 08:18 PM
Re: Mapping with IF

Sounds more like you might want
 Code:
If Exist ("\\wcam33\pessoal\”+@userid)
 Use S: "\\server\pessoal\" + @userid
Else
 If Exist ("\\wcam33\pessoal2\”+@userid)
  Use S: "\\server\pessoal\" + @userid
 Endif
EndIf


NTDOCAdministrator
(KiX Master)
2007-11-08 01:35 AM
Re: Mapping with IF

Where are the CODE TAGS there Garg? ;\)

Gargoyle
(MM club member)
2007-11-08 04:47 AM
Re: Mapping with IF

You are correct Doc, and so fixed....

marcelodelima
(Lurker)
2007-11-12 03:45 PM
Re: Mapping with IF

Gargoyle,

Working fine your suggestion!!!


Thanks a Lot!!!!

Regards,
Marcelo