Publishing Word Template on Terminal Server

Downloads
39125.zip

The company I work for has a mixture of Windows NT Workstation and Windows NT Server 4.0, Terminal Server Edition (WTS) users. On our Nine-Terminal-Server farm, we publish Microsoft Word to approximately 300 users. We made some simple changes to the master normal.dot Word template. (This custom Visual Basic for Applications—VBA—template adds itself to Word as a menu option.) We then needed to copy this template to \servername\master.tsprofiles\username\Application Data\Microsoft\templates. (The master.tsprofiles folder holds all the WTS users' profiles.)

I wrote the script that Listing 1 shows to obtain the users' profile folder names that needed the updated template. This script loops through the master.tsprofiles folder and returns the names of all the subfolders (i.e., the names of the users' profiles).

Next, I wrote the script that Listing 2 shows to copy the modified master template to the \servername\master.tsprofiles\username\Application Data\Microsoft\templates folder. To run this script, you need to make sure that the username.txt file and the normal.dot Word template are on the computer's C drive. The script replaces the %i variable with %username% from the text file username.txt in Listing 1.

After we ran these two scripts, our problem was solved. We were able to update the normal.dot template in all the users' profiles in \servername\master.tsprofile\username\Application Data\Microsoft\templates.

Discuss this Article 2

Bo Stephens (not verified)
on Jul 2, 2003
Sheesh... Listing 1 (GetProfileName.vbs) is a little excessive. You can get the same results with a one line batch file that would look like this: dir /ad /b "%userprofile%\.." > c:\username.txt Or for a remote server dir /ad /b "\\servername\share\profilepath" > c:\username.txt Anyway, you get the point... simplicity. You could add this at the top of Listing 2 (UpdateTemp.bat) and provide a single mechanism for executing your solution.

Please or Register to post comments.

IT/Dev Connections

Las Vegas
September 30th - October 4th

Paul ThurottYou'll have the opportunity to experience:
• The Microsoft
Technology Roadmap
• Office 365 Implementation
• Hyper-V Optimizing
• Windows 8 Deployment
and much more!

Come See Paul Thurrott & Rod Trent in Person!

Early Registration Now Open

Upcoming Training

Mastering System Center 2012

During over 6 hours of training you can join John Savill from your computer as he will walk you through the key components and capabilities of System Center 2012, what’s involved in using the components, and the benefit they can bring to your environment.

Register Now

Current Issue

May 2013 - The NameTranslate object is useful when you need to translate Active Directory object names between different formats, but it's awkward to use from PowerShell. Here's a PowerShell script that eliminates the awkwardness.

CURRENT ISSUE / ARCHIVE / SUBSCRIBE

Windows Forums

Get answers to questions, share tips, and engage with the Windows Community in our Forums.