Much simplier than that. Remember there is always a default root and for each root a default site.
If you want to setroot to 3.8.1P just by executing the setroot command, simply change the default root.
Edit the file $QUOVADX_INSTALL_DIR/integrator/productinfo/defaults and change the root= to point to your 3.8.1P root. Later, when you want 5.x to be the default, change it again.
Likewise, you can set the default site by editing the file $HCIROOT/roorInfo. Add the line: site=
Charlie