> cool solutions home   > cool tools home
Tree Script
Setting the preferred tree programmatically.
Reader Rating    from ratings rate this article
View a Printer Friendly Version of this Page Send this page to a friend
vitals
Posted: 24 Jun 2003
File Size: 44KB
License: Free
Download 1:  preftree.exe
Publisher: Thomas Greger
disclaimer
Please read the note from our friends in legal before using this file.
details

I created a tool for a customer who wanted to set the preferred tree to a different tree from the login script.

The program requires the tree name as the parameter, e.g. "PrefTree NOVELL_INC". For troubleshooting purpose, the program can show detailed messages, if the parameter "/v"("verbose") is specified as the second parameter. Without "/v" the program operates in a quiet mode, to not confuse end users with disturbing messages.

How the program works:
The user needs to be already logged into the second tree that he wants to become the primary tree (Usually from a login script or other kind of script). PrefTree.exe finds the first connected server in the specified tree and makes it the preferred server. Then the program sets the new tree as the preferred tree. If the user has the "Default Server"-attribute set, the program tries to make this server the primary server.