To do with making this setting only once, this is what we do ... We store a cookie in a custom registry area, for the logon script, in this example at $HKCULOGON and I called the cookie "OfficeCookie". Instead of using just a flag, we use sort of a cookie versioning scheme, so that if we need more changes down the road, we just bump the cookie verison number by one. Start with one, then bump to two, etc ... heres a template of what *we* do, with some of the error checking removed for clarity (this is ripped from our login script) ...
Code:
Break On
$HKCULOGON = "HKCU\Software\AcmeInc\Logon"
$OfficeCookieVersion = 1
If Val(ReadValue($HKCULOGON,"OfficeCookie")) < $OfficeCookieVersion
$= WriteValue("HKCU\Software\Microsoft\Office\10.0\Common\General", "UserTemplates", "c:\mytemplates3", "REG_SZ")
$= WriteValue($HKCULOGON,"OfficeCookie",$OfficeCookieVersion,"REG_DWORD")
ENDIF
Exit 0
-Shawn