|
|
|||||||
Ok, here is the scenerio: I have 3 offices with 3 domain controllers in the same domain. I want to write a script that will allow a user in the remote office to login there and map all of his drives to the local server. Then if the user comes to another office, I want him to login with the same login but map to the shares on the local server in the new office. Here are the details: Primary Domain Controller : NT1 Subnet: 10.0.0.0 255.255.255.0 Remote DC : Gonzales Subnet: 10.0.2.0 255.255.255.0 Name of login scripts that will be used: For Primary DC : perkins.bat For Remote DC : gonzales.bat I'm trying to figure this out in vbs but someone told me to try kix first b/c it's a lot easier and more powerful than vbs. Does anyone out there know how to do this with kix?? Thanks in advance for your help.. Ryan |
||||||||
|
|
|||||||
use the enumipinfo() command to determine which gateway is active on the lan adapter. then run a select/case series to compare the results and match them to a specific server at that site. then map your server using that server. |
||||||||
|
|
|||||||
Speak english please...I'm new to scripting and have no clue where to start with this. Thanks for the help ...Can you write it for me based on the info I gave you?? Thanks |
||||||||
|
|
|||||||
code: |
||||||||
|
|
|||||||
Thank you!!! |
||||||||
|
|
|||||||
Whoops, one thing I forgot to mention is that if they are logging in to NT1, they will need to map drives to different servers and if the login to gonzales, they will only map to one server. Let me ask you this, is there a way in kix to call batch files, for example if it sees that the subnet is nt1, can it call nt1.bat and vice versa for gonzales. If so, can you give me an example. Thanks again for the help Ryan |
||||||||
|
|
|||||||
if a user is logging in the the 10.0.0 subnet you want to map X drives, and if logging in from the 10.0.2 subnet map Y drives... is this right? Bryce |
||||||||
|
|
|||||||
yeap, exactly..Here it is in full: User logs in to 10.0.0.1: User logs in to 10.0.2.1 Net uses everything on one server, not multiple.. |
||||||||
|
|
|||||||
If you are using Kix4.0 i suggest using one of the 2 Subnet UDF's that are out there.
Bryce |
||||||||
|
|
|||||||
Now I'm really confused ..Keep in mind, I've never used kix or programmed before. My boss asked me to do this for him and I have no clue where to start... |
||||||||
|
|
|||||||
code: |
||||||||
|
|
|||||||
Thanks again!!! Now do you know how to do it with vbs Ryan [ 29 January 2002: Message edited by: ryanro ] |
||||||||
|
|
|||||||
Another way, use @LSERVER value, which will tell you the domain server authenticating the client. Can be something such as: code: This especially true if running KiX 3.x, as 'enumipinfo' is only in KiX 4.x. Bill |
||||||||
|
|
|||||||
It still isn't working, it jumps straight to case 1 and quits.... |
||||||||
|
|
|||||||
ryanro, instead of case $gateway=" 10. 0. 0. 1" try it with: case instr("$gateway","10.0.0.1") or just case $gateway=" 10.0.0.1" in the case 1 print out the gateway variable to see which is the correct syntax. |
||||||||
|
|
|||||||
ryanro - What version of KiX are you using? |
||||||||
|
|
|||||||
The most recent one from this site... |
||||||||
|
|
|||||||
ryanro, Watch your spacing on the IP. The examples are all over the map. Everyone is offering up suggestions, yet you don't say what you're using so how can anyone know what's going wrong. Try posting some code. |
||||||||
|
|
|||||||
Don't worry about it, I got it. Thanks to the post about seeing what gateway it's using. Thanks for all the help everyone!!!! |