I am creating a script that will map different drives and also change a registry setting to use one of the newly mapped drives. I am not having a problem with mapping the drives, but I am not sure how to do the registry setting.

The registry setting I want to edit is "HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\9.0\Common\General\SharedTemplates

It currentlly has a UNC path name but I want to change it to the T drive. Here is the statemant I was using to do this.
WriteValue("HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\9.0\Common\General", "SharedTemplates", "T:\", "REG_EXPAND_SZ")

I have this statement after I haved mapped the T drive, and the T drive is getting mapped.

Thanks for the help in advance.