Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1215
  • Last Modified:

Populate Word template location by AD Group

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
aideb
Asked:
aideb
  • 2
  • 2
  • 2
  • +1
5 Solutions
 
alayannaCommented:
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
 
PeteJThomasCommented:
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
 
aidebAuthor Commented:
I would prefer if possible to do this via vbscript or using a GPO if this is possible?
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
PeteJThomasCommented:
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
 
alayannaCommented:
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
 
DK_UserCommented:
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
 
aidebAuthor Commented:
Decided to go with individual GPO's at each site. Thanks for all the suggestions and help

Cheers

Aidan
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now