Solved

Populate Word template location by AD Group

Posted on 2009-05-14
7
1,195 Views
Last Modified: 2012-05-07
Currently we have a number of small sites who have their own local servers. Each server has the site's word templates for that specific location (T:\Templates)

We are going to be centralising these files and amalgamating them on one server. As there are so many templates, we don't want to place them all in the same folder and want to only present the same templates to the same users as before. Each user will now get access to the same T drive location.

I think the best way to sort this out would be to place the templates within sub folders and redirect the clients to the relevant subfolder depending on an AD group. So;

Templates would be located at
T:\Templates\Main Street
T:\Templates\High Street
T:\Templates\John Street

and there would be an AD group for each (e.g. MainStreetUsers-GRP, etc)

I have previously seen somewhere where the decription field of a group was used to populate a location for drive mappings and guess the same principle could be used here?

This would then have to be inserted into the registry or interpreted by a Group Policy?

Is there an easier way to do this? Any pointers? code?

Many thanks

Aidan
0
Comment
Question by:aideb
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 1

Assisted Solution

by:alayanna
alayanna earned 225 total points
ID: 24383389
Create a kix script and run it as a logon script:
IF INGROUP ("MainStreetUsers-GRP")
      SHELL WriteValue('HKCU\Software\Microsoft\Office\11.0\Common\General','SharedTemplates','T:\Templates\Main Street','REG_SZ')
ENDIF
IF INGROUP ("HighStreetUsers-GRP")
      SHELL WriteValue('HKCU\Software\Microsoft\Office\11.0\Common\General','SharedTemplates','T:\Templates\High Street','REG_SZ')
ENDIF
IF INGROUP ("JohnStreetUsers-GRP")
      SHELL WriteValue('HKCU\Software\Microsoft\Office\11.0\Common\General','SharedTemplates','T:\Templates\John Street','REG_SZ')
ENDIF
QUIT
0
 
LVL 19

Assisted Solution

by:PeteJThomas
PeteJThomas earned 175 total points
ID: 24383729
Something just worth considering too - Using drive mappings for things like this MAY become problematic. If the mapping on the client fails, or if the script runs before the mapping has been made, then T: doesn't exist...

So it MAY be worth using the full UNC path to the server instead of including the mapping for this script.

Just a thought... :)

Pete
0
 
LVL 2

Author Comment

by:aideb
ID: 24385230
I would prefer if possible to do this via vbscript or using a GPO if this is possible?
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 19

Accepted Solution

by:
PeteJThomas earned 175 total points
ID: 24385455
To do it via a GPO, you would need to have separate GPOs for each group of people or site or however you separate them.

From there, there are different ways of applying the GPOs to the users - You could either apply all GPOs to some sort of root OU or at the domain level, then using the security filtering options of the GPO, only allow the relevant users the permissions to apply each policy.

However my preferred method, would be to if you alreayd have the users separated into different OUs (site OUs or whatever) and simply linked each policy to it's corresponding OU.

So, as for the policies themselves, you need to install some new admin templates I believe. See this on how to do so - http://www.windowsnetworking.com/kbase/WindowsTips/Windows2003/AdminTips/Network/ManagingMicrosoftOfficeApplicationswithGroupPolicy.html

However I can find no reference to the specific settings available in these templates, so I can provide no guarantee that there is a setting to define where the template is stored for the objects that policy is linked to. There is some info about the settings available here - http://office.microsoft.com/en-gb/help/HA011402401033.aspx

Now, there is an alternative if the necessary settings are not available. There is a freeware tool available called 'RegToAdm' - All this tool does, is to create a custom admin template from an exported .reg file. So you'd simply need to edit the registry on a PC to reflect the first location for the template. Export that key to a .reg file, then use the tool to create an .adm file that can then be enforced through a GPO.

You can find the tool here - http://3d2f.com/tags/regtoadm/download/  The tool itself is a part of a larger toolset called NUTs. It definitely works in most cases, however this should be thoroughly tested in a test environment before deploying any custom templates into a production environment.

Let me know if you have any further questions... :)

Pete

0
 
LVL 1

Assisted Solution

by:alayanna
alayanna earned 225 total points
ID: 24385952
Try:

Set objSysInfo = CreateObject("ADSystemInfo")
strUserInfo = "LDAP://" & objSysInfo.UserName
Set objUser = GetObject(strUserInfo)
Set objGroup = GetObject("LDAP://cn=Group,cn=Users,dc=Domain,dc=com")
 
If (objgroup.IsMember(objUser.AdsPath) = True) Then
      WS.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Common\General","'T:\Templates\Main Street'"
end if
0
 
LVL 3

Assisted Solution

by:DK_User
DK_User earned 100 total points
ID: 24386210
Word has a standard filepath for WorkGroup Templates, which you can set through GPO.

You will have to load the Office 2007 Administrative Template (ADM) from this link into the appropriate GPO.
http://www.microsoft.com/downloads/details.aspx?FamilyID=92d8519a-e143-4aee-8f7a-e4bbaeba13e7&displaylang=en
After you have applied the ADM file, you simply set the Workgroup templates path to the appropriate serverpath under:
User Configuration - Administrative Templates - Microsoft Office 2007 System - Shared Path
It could look like this> \\server\templates\mainstreet
Place the shared templates in the folder and be sure to give usergroups the appropriate Share Rights(Full), and NTFS( Read)

Users can now use the shared templates directly from within Word when making a new documents.
"File" - New - Installed Templates
When users have used the Template for the first time, it appears also unde My Templates
http://support.microsoft.com/kb/924460
Hope it helped





 
0
 
LVL 2

Author Closing Comment

by:aideb
ID: 31581372
Decided to go with individual GPO's at each site. Thanks for all the suggestions and help

Cheers

Aidan
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to show you some basics you can do with Mailings in MS Word. It´s quite handy feature you can use for creating envelopes, labels, personalized letters etc. First question could be what is this feature good for? Mailing can really he…
Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
In a previous video Micro Tutorial here at Experts Exchange (http://www.experts-exchange.com/videos/1358/How-to-get-a-free-trial-of-Office-365-with-the-Office-2016-desktop-applications.html), I explained how to get a free, one-month trial of Office …

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question