• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 781
  • Last Modified:

Office Template location needs to be changed to the user TS HOME directory

Hi,

In order to migrate to WIN7 we are going to have to run business legacy application on Windows 2003 Terminal Services. The app doesn't work on W2k8 or Win7, etc... (thinapp and App-v have been tested and don't work, also is out of our budget).

The application needs Word97 as the editor.

We have everything working with the exception of the User Templates which they have to be moved from C:\...\Microsoft Office\Templates to the TS user home directory which will be H:\

I have found the following article where someone explains what we are trying to accomplish (http://www.tek-tips.com/viewthread.cfm?qid=110001&page=334 )

The post says to change the default location at the word97 options, etc... from the C: drive to the H:\ drive. The problem is that I can't choose an H:\ drive because word97 needs to validate that the drive is available. That being said If I use the one that I have created for the administrator then it is goes to that particular one.

The goal is that every user is going to have the folder templates copied as part of their TS profile H:\templates

I have copied the post below and attached a picture of the setting that I need to change:

----------------------

I support all who say that you should get away from using mandatory profiles and/or desktops.  Best thing you can do is simply use published applications with policies and proper security.  I did mandatory profiles for 4 years; a real pain.  Anyway, if you must, than I’ll offer you my two-cents worth.  (and I NEVER used compatibility scripts).  
Log onto your MF server as Administrator.  Execute MS Word. Go to tools\Options and the File Locations tab.  Here modify the path for User Templates to point to the users home(working dir) such as H:\Office97\templates.  In addition to this I also modified the following:

User Templates = H:\Office97\templates
Documents = H:\Personal or H:\My Documents
User Options = H:\Office97
AutoRecover files = H:\Personal or H:\My Documents
Startup = H:\Office97\WrdStart

All other settings should be common and point to something under ‘local drive’\**\Office97\…

Close Word and reopen.  Verify that in Word the path still points to H:\**** and not \\servername\****.  If it does than you may have to go to the registry HK_C_U\Software\Microsoft\Office\version\Common\FileNew\LocalTemplates and modify the path.

Log out as Administrator.  Log on as another Administrator (diff profile) and run System from the Control Panel.  Here go to the User Profiles tab.  If you want these changes to apply to all new users than copy the 1st Administrators profile to your Default User profile.
Modify all users accounts  ‘Terminal Server Profile Path’ to point to “C:\WTSRV\profiles\Default User.MAN”  You do NOT need to rename any *.dat files to *.man.  Referring to the directory as .man will suffice.  Now delete all user profiles from the profiles directory (be sure to leave the system profiles alone).  

If you wish to apply this only to certain users than perform the profile copy from admin to users profile and modify the users accounts  ‘Terminal Server Profile Path’ to point to C:\WTSRV\profiles\userID.MAN.  Again, I do not believe that you will have to rename ntuser.dat to ntuser.man

It has been a while since I’ve worked with this but I believe that when your users log on for the first time and run Word they will be queried to save normal.dot .  This should create a new normal.dot in their users home(working dir) specified under tools.  If this doesn’t work than you might want to copy normal.dot from the server to each users H:\Office97\templates.
This should put you in the ball park.  Play around with this.  It should work for you… it worked for me.




offce97-SaveTemplates.jpg
0
llarava
Asked:
llarava
  • 6
  • 2
1 Solution
 
thehagmanCommented:
Yes, but what is your question actually?
I mean, your H: drive where you put your template is available , isn't it? If not, why not?
0
 
llaravaAuthor Commented:
The normal.dot lives in C:\...\templates it needs to be changed for example to the TS home directory for every user.

The TS server will be used by multiple users and the normal.dot and templates can not be accessed by all the users at the same time.

0
 
llaravaAuthor Commented:
Basiscally I thin that I can solve my problem with the Office97.cmd compatibility script, however I haven't been able to understand how do we have to run it and configure it.

http://support.microsoft.com/kb/210231

I am not sure how does the script work and what is the drive that it gets mounted also do we have to run the script  logon script? is this a one time thing?
0
Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

 
llaravaAuthor Commented:
I am not using Citrix just TS 2003.

The following documents explains the steps and they do not use compatibility scripts.

On Step 3 they say to "change the directory to the user’s own home directory" - The problem is that I can't select a "HOME DIRECTORY" for everyone instead I have to chose and specific user and then they all go to the same location...

So I have 2 options I either go with compatibility scripts which I don't quite understand or try to change the template path at the word level...I would like to go with 2 because I will save the scripts but I must be mising something.


http://support.citrix.com/servlet/KbServlet/download/493-102-8016/MSOffice97.pdf

When installation is complete, each user must follow the procedure below
1. Copy Microsoft Office\Templates\NORMAL.DOT to each user’s profile
directory.
2. Log on to the WINFRAME host and open Word 97.
3. From the Tools pull-down menu, select Options, File Locations, User
Templates and change the directory to the user’s own home directory.
0
 
llaravaAuthor Commented:
I believe that once you run the compatibility script and indicate the drive according to the example let's say we go with W: then you just have to change the templates to go to W:\ which will be available for every user that logs on into the TS. This is just a guess I haven't tried yet.

If someone has done this before or knows about it I would appreciate if I can get an explanation on how this whole setup works togheter?

Thanks!
0
 
RobSampsonCommented:
Hi, for Word 97 it looks the templates paths can be changed by modifying:
HKEY_LOCAL_MACHINE\Software\Microsoft\Office\8.0\Common\FileNew\LocalTemplates
HKEY_LOCAL_MACHINE\Software\Microsoft\Office\8.0\Common\FileNew\SharedTemplates

Firstly though, instead of specifying H:\Templates, we always specify UNC paths, just in case users don't have the drive mapped for some reason.  So, I would suggest just trying to modify the LocalTemplates or SharedTemplates value to
\\server\share\Templates

and see how that goes.  If that works, we can script it to copy the Normal.dot to their home directory, and also read the home directory path from their AD account, and modify the registry accordingly.

Regards,

Rob.
0
 
llaravaAuthor Commented:
Hi Rob,

The normal.dot and the STARTUP macros have to be accessed individually by each and every user.

Our issue is that we can not specify a UNC path otherwise everything will be kept in the same place.

We have followed the this KB http://support.microsoft.com/kb/210231/EN-US

By running this script you have can select a drive for example W: which will be mapped to your TS HOME directory (already configured in AD)

W:\point to H:\ --> This is the drives that is pointing to your TS home directory
H:\user\templates --> The TS HOME directory

By doing this you can manually go to Word97 and change the TEMAPLTES and STARTUP location to point to W:\ without having to specify a UNC path. This is solving the problem because the path becomes generic.

The problem that I am facing now is that I need to change the default location for the Word97 TEMAPLTES and STARTUP to point to W:\
For the time being I can manually do it and it seems to work fine, ,however this needs to be automatically change for all the users.

I have tried:

HKEY_LOCAL_MACHINE\Software\Microsoft\Office\8.0\Common\FileNew\LocalTemplates
HKEY_LOCAL_MACHINE\Software\Microsoft\Office\8.0\Common\FileNew\SharedTemplate

I have created the following keys in both locations --->  REG_SZ  W:\Office97\Templates

Unfortunately this doesn't seem to change the default location in Word97 which seems to be pointing to the local path C:\Program...

Do you have any suggestions?



@Echo Off

Rem
Rem  NOTE:  The CACLS commands in this script are only effective
Rem         on NTFS formatted partitions.
Rem

Rem #########################################################################

Rem
Rem Verify that %RootDrive% has been configured and set it for this script.
Rem

Call "%SystemRoot%\Application Compatibility Scripts\ChkRoot.Cmd"
If "%_CHKROOT%" == "FAIL" Goto Done

Rem #########################################################################

Rem
Rem Get the installation location of Office 97 from the registry.  If
Rem not found, assume Office isn't installed and display an error message.
Rem

..\ACRegL %Temp%\O97.Cmd O97INST "HKLM\Software\Microsoft\Office\8.0\Common\InstallRoot" "" ""
If Not ErrorLevel 1 Goto Cont0
Echo.
Echo Unable to retrieve Office 97 installation location from the registry.
Echo Verify that Office 97 has already been installed and run this script
Echo again.
Echo.
Pause
Goto Done

:Cont0
Call %Temp%\O97.Cmd
Del %Temp%\O97.Cmd >Nul: 2>&1

Rem #########################################################################

Rem
Rem Change the Access 97 System Database to Read only.  This lets
Rem multiple people run the database simultaneously.  However, it
Rem disables the ability to update the System Database, which is
Rem normally done through the Tools/Security menu option.  If you
Rem need to add users, first you must put write access back on the
Rem system database.
Rem

If Not Exist %SystemRoot%\System32\System.Mdw Goto Cont1
cacls %SystemRoot%\System32\System.Mdw /E /P EveryOne:R >NUL: 2>&1
cacls %SystemRoot%\System32\System.Mdw /E /P Administrators:R >NUL: 2>&1
:Cont1

Rem #########################################################################

Rem
Rem Allow read access for everybody on a system DLL that is updated by
Rem Office 97.
Rem

If Exist %SystemRoot%\System32\OleAut32.Dll cacls %SystemRoot%\System32\OleAut32.Dll /E /T /G EveryOne:R >NUL: 2>&1

Rem #########################################################################

Rem
Rem Change Powerpoint Wizards to Read Only to allow more than one
Rem simultaneous invocation of the Wizard.
Rem

If Exist "%O97INST%\Templates\Presentations\AutoContent Wizard.Pwz" Attrib +R "%O97INST%\Templates\Presentations\AutoContent Wizard.Pwz" >Nul: 2>&1
If Exist "%O97INST%\Office\Ppt2html.ppa" Attrib +R "%O97INST%\Office\Ppt2html.ppa" >Nul: 2>&1
If Exist "%O97INST%\Office\bshppt97.ppa" Attrib +R "%O97INST%\Office\bshppt97.ppa" >Nul: 2>&1
If Exist "%O97INST%\Office\geniwiz.ppa" Attrib +R "%O97INST%\Office\geniwiz.ppa" >Nul: 2>&1
If Exist "%O97INST%\Office\ppttools.ppa" Attrib +R "%O97INST%\Office\ppttools.ppa" >Nul: 2>&1

Rem #########################################################################

Rem
Rem Create the MsForms.Twd and RefEdit.Twd files, which are needed for 
Rem Powerpoint and Excel Add-ins (File/Save as HTML, etc).  When either 
Rem program is run, they will replace the appropriate file with one 
Rem containing the necessary data.
Rem

If Exist %systemroot%\system32\MsForms.Twd Goto Cont2
Copy Nul: %systemroot%\system32\MsForms.Twd >Nul: 2>&1
Cacls %systemroot%\system32\MsForms.Twd /E /P EveryOne:F >Nul: 2>&1
:Cont2

If Exist %systemroot%\system32\RefEdit.Twd Goto Cont3
Copy Nul: %systemroot%\system32\RefEdit.Twd >Nul: 2>&1
Cacls %systemroot%\system32\RefEdit.Twd /E /P EveryOne:F >Nul: 2>&1
:Cont3

Rem #########################################################################

Rem
Rem Remove Find Fast from the Startup menu for all users.
Rem Find Fast is resource intensive and will impact system
Rem performance.
Rem

If Exist "%SystemRoot%\Profiles\All Users\Start Menu\Programs\Startup\Microsoft Find Fast.lnk" Del "%SystemRoot%\Profiles\All Users\Start Menu\Programs\Startup\Microsoft Find Fast.lnk" >Nul: 2>&1

Rem #########################################################################

Rem
Rem Change Registry Keys to make paths point to user specific
Rem directories.
Rem

Rem If not currently in Install Mode, change to Install Mode.
Set __OrigMode=Install
ChgUsr /query > Nul:
if Not ErrorLevel 101 Goto Begin
Set __OrigMode=Exec
Change User /Install > Nul:
:Begin

..\acsr "#ROOTDRIVE#" "%RootDrive%" Template\Office97.Key Office97.Tmp
..\acsr "#INSTDIR#" "%O97INST%" Office97.Tmp Office97.Key
Del Office97.Tmp >Nul: 2>&1

regini Office97.key > Nul:

Rem If original mode was execute, change back to Execute Mode.
If "%__OrigMode%" == "Exec" Change User /Execute > Nul:
Set __OrigMode=

Rem #########################################################################

Rem
Rem Update Ofc97Usr.Cmd to reflect actual installation directory and
Rem add it to the UsrLogn2.Cmd script
Rem

..\acsr "#INSTDIR#" "%O97INST%" ..\Logon\Template\Ofc97Usr.Cmd ..\Logon\Ofc97Usr.Cmd

FindStr /I Ofc97Usr %SystemRoot%\System32\UsrLogn2.Cmd >Nul: 2>&1
If Not ErrorLevel 1 Goto Skip1
Echo Call Ofc97Usr.Cmd >> %SystemRoot%\System32\UsrLogn2.Cmd
:Skip1

Echo.
Echo   To insure proper operation of Office 97, users who are
Echo   currently logged on must log off and log on again before
Echo   running any Office 97 application.
Echo.
Echo Microsoft Office 97 Multi-user Application Tuning Complete
Pause

:done

Open in new window

0
 
llaravaAuthor Commented:
Hi,

I have made some progress basically the H: is mapped already via TS AD. By using the compatibility scripts (office97.cmd) I am able to create a drive (W:) that points to the H:\ (Ts home directory) by doing this I can configure the path at the registry level Word97 to go to W:\Office97\Templates which will go to the H:\%username%\TS home\Office97\templates

I change the registry at from C:\program...\ to W:\office97\templates

HKEY_LOCAL_MACHINE\Software\Microsoft\Office\8.0\Common\FileNew\LocalTemplates
HKEY_LOCAL_MACHINE\Software\Microsoft\Office\8.0\Common\FileNew\SharedTemplates

Basically every user has its own normal.dot templates as well as their own STARTUP macros.    

I have followed the following article http://support.microsoft.com/kb/210231

I have downloaded the compatibility scripts at

http://www.google.com/#hl=en&source=hp&q=office97.cmd&oq=office97.cmd&aq=f&aqi=g1g-v1&aql=1&gs_sm=e&gs_upl=328l2469l0l2609l12l9l0l1l1l1l359l1609l2-5.1l6l0&bav=on.2,or.r_gc.r_pw.,cf.osb&fp=97eaa31f18749096&biw=1680&bih=849

That being said, the problem that I am having is that the for some reason when a exit out from Word I get the following message:

"Word Configuration Problem Detected and Repaired. Please kill and restart word"

By closing and restarting word I have seen that the W:\office97\template path is changed back to c:\program files...\

HKEY_LOCAL_MACHINE\Software\Microsoft\Office\8.0\Common\FileNew\LocalTemplates

Any suggestions?
0
 
RobSampsonCommented:
I found the scripts from here:
http://sites.google.com/site/mellerbeck/Home/applicationCompatibilityScripts.zip?attredirects=0

Which was linked from here:
http://michaelellerbeck.com/2008/11/11/office97cmd-download-for-running-office97-on-terminal-server-2003/

Anyway, that's probably the same that you had found.

The only thing I can think of is that maybe the user doesn't have rights to change
HKEY_LOCAL_MACHINE\Software\Microsoft\Office\8.0\Common\FileNew\LocalTemplates

You say though that it's fine if you change it manually from the Word GUI, and you can then close it and open it again and still have the correct path?

That's odd.

So, do you have %SystemRoot%\System32\UsrLogn2.Cmd?

If not create it.  It so, add something like this to it.
reg add HKCU\Software\Microsoft\Office\8.0\Common\FileNew /v LocalTemplates /t REG_SZ /d W:\Office97\Templates

One thing I've just noticed, is that you're changing the HKEY_LOCAL_MACHINE values, and not HKEY_CURRENT_USER values, so maybe that's causing an issue.  The above command should add the template path under HKEY_CURRENT_USER, but I'm not sure if that will override the HKLM one or not.  Try deleting the LocalTemplates value under HKLM\Software\Microsoft\Office\8.0\Common\FileNew\  and then see if the above reg add command runs when a user logs in.

UsrLogn2.Cmd should be run by UsrLogon.cmd by this line
Call %SystemRoot%\System32\UsrLogn2.Cmd

Hope that helps.

Rob.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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