Itoo Software Forum

Author Topic: HowTo set RailClone and ForestPack User-library path via MaxScript.  (Read 2905 times)

Klonsemann

  • Jr. Member
  • **
  • Posts: 61
I found a way to set the RailClone and ForestPack User Library with a MaxScript.
Im working for a studio and we wanted to have all users share the same library located on our server.

They are stored in the registry, but the entrys are created by the first Librarybrowser opening.
So for savety reason there is a try catch with feedback.

Code: [Select]
try (
registry.openKey HKEY_CURRENT_USER "Software" accessRights:#all key:&key1
registry.openKey key1 "Itoo Software" accessRights:#all key:&key2

        --use one of the two following lines to set RailClone or ForestPack
registry.openKey key2 "RailClone Pro" accessRights:#all key:&key3
        --registry.openKey key2 "Forest Pack Pro" accessRights:#all key:&key3

registry.openKey key3 "LibraryDir" accessRights:#all key:&key4

registry.setValue key4 "User's Libraries" #REG_SZ "\\\\server\\your lib folder"
registry.flushKey key4
registry.closeKey key4
registry.closeKey key3
registry.closeKey key2
registry.closeKey key1

print "Setup Library successful."
) catch (
messageBox "ERROR setting Library !" beep:true
)

Maybe someone finds that handy, feedback welcome :) .