|
Hi
I did write some kind of simple Kix script in the past but almost forget everything since then I never written anything but now I need to write again. Can someone please help with this? I want to map a network drive by using ini file which contain the following information.
; Map Drive For Everyone
[Domain Users]
S: "\\fileserver\software"
[Finance]
O: "\\fileserver\finance"
[Marketing]
M: “\\fileserver\marketing”
I can map the drive by using the follow script but I don’t want to change the script every time whenever I need to insert the new network drive for user. Therefore I just want share the folder on the network and insert group name [groupname] and the path to share in the ini file as you can see the above. The next time when the script run it automatically map the new network for users
If InGroup (Domain Users) = 1
Use G: "\\ldcgoidc01\Fileshare" /PERSISTENT
? "G File share Drive mapped successful"
Else ? "G Drive Mapping unsuccessful. Please contact IT "
Endif
Or
Select
case Ingroup("Finance")
Use H: "\\fileserver\Finance" /PERSISTENT
? "H Finance Drive Mapped Successful" chr (10)
case InGroup ("Marketing")
Use M: "\\fileserver\Marketing" /PERSISTENT
? "M Marketing Drive Mapped Successful" chr (10)
Case 1
EndSelect
I don’t know how to write a Function to do this. So I hope someone can help me with this. Thank you in Advance...
Edited by Kevin4u2005 (2011-10-01 06:08 PM)
|