Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Searching for Normal.dot for multiple users

Status
Not open for further replies.

Jtorres13

Technical User
Nov 11, 2006
162
US
Hello all. We're installing new PCs inmy office. For some reason not everyone has Normal.dot in the same location. It's been tedious to first do a search and then copy the file to the backup location for transfer. I still have 86 PCs to go.

I have to open Word and check the User Templates location in Tools | Options | File Locations and then go get the file, copy it, etc.

How can I make a batch file or script that reads the
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Data key and gets the location for Normal.dot, then copies the file to the backup location (U:\ drive)?

Anyone, any ideas?
 
The file should be in c:\documents and settings\User Profile\Application Data\Microsoft\Templates, I've never seen it anywhere else unless you are talking about Windows 98 machines. You also shouldn't have a need to back it up since Word will recreate the file if its not there, or do you use a modified default template for word in which case you should be able to just push it out to the location above and not have a problem.


 
No, no... :(

Check my details. I said users have it in different locations. Some users have it in C:\Program Files\Microsoft Office\Office 11

others have it in Documents and Settings, others have it in another location.

In additino, I said that I have 86 PC this way. I would like to finish sometime to day and be able to have lunch at some point.
I am familiar with Normal.dot, I can't have it recreated, it's HEAVILY customized. I must move it from old PC to new PC.

In order to "push it out" to the new PC, I have to do a search first, in every PC.

Someone please help.


 
Below is the default search order from the Microsoft website. In that order, based on that and the fact that if there are multiple Normal.dot files on the system it will use the first one that it finds, pushing the file to the first directory that it search's should solve your problem, as normal.dot, however that will cause you a problem if each user has a different normal.dot file as this would run the same normal.dot for all users on the workstation.

Before the Normal.dot template is applied to a file, Word 2003 searches a combination of templates that are found in one of the following three folder locations:
• Installed Templates:
C:\Program Files\Microsoft Office\Templates\1033
• User Templates Path (Default folder):
C:\Documents and Settings\<Username>\Application Data\Microsoft\Templates
• Workgroup Templates Path:
<Not set by default>
 
There is a setting in Tools | Options | File Locations for User Templates. This setting is different for many of my users.

This setting is held in the registry as:HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Data. I included this information in my original post.

Word looks at the registry key, which says to look at that setting in Tools | Options, then it gets the path and opens the appropriate Normal.dot. This, of course, for each logged in user. In my case, I will be gettnig the file when the users are logged in, so the matter of having many profiles, doesn't affect me.

All I want to do is go to the registry key that contains that setting, read what it says (get the path), then do a search and find the file so I can copy it to another folder.

Is there a way to read registry key? Specifically talking about the one I listed here.

 
I'm sorry but there is no easy way to extract the User Templates location from the Word Data registry key; its format is undocumented. Your best bet would probably be to run Word on each PC and extract the Options value from there (if you had 86,000 rather than 86 PCs it might be worth more effort).

Enjoy,
Tony

------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.

Professional Office Developers Association
 
Thank you all for trying. Somone posted this in the VBScript forum. Apparently, the format is documented and it can be read. Thanks dm4ever!! I will try it for next time. Unfortunately, I had to finish reading each one manually, but I want to learn more scripting to learn to automate this cr@p.

Read on:

You can read the registy using WScript.Shell

You can copy the file using FileSystemObject
--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top