Global templates and login scripts 
Author Message
 Global templates and login scripts

In several recent posts I've seen a recommendation, for Word add-ins,
to have each user's login script automatically copy global templates
from a network folder to the user's local drive.  The main advantage:
It's easier to maintain/update the global template because since it's
not "in use" so you don't have to get everyone to close Word whenever
you update the global.

The step I'm missing is how to write that network login script, what
to name it, and where to put it.

Can I just write a DOS batch file with a COPY command?  Can it even
just be part of the Autoexec.bat?  If not, could someone point me to
a resource for learning to write these things?

Many thanks.


-------------- "Life is nothing if you aren't obsessed." --John Waters
----------------------------------------------------------------------



Mon, 11 Aug 2003 10:29:33 GMT  
 Global templates and login scripts
The login script is a function of your networking software.
I haven't done scripting for years (I don't have that kind of network
permissions). If you have a network administrator, ask him/her about this.

You could put it in a DOS batch file each user's Windows startup folder
(inside the Programs folder). I would recommend using XCOPY rather than COPY
since it can test for file dates, only update if there is a newer version
and can write over the top of read-only files.

To get the switches for XCOPY try running either of the following at a DOS
prompt:

XCOPY /? >"C:\My Documents\XcopyDocumentation.txt"
XCOPY /? | More

The first one will give you the help screens in a file (assuming you have a
directory C:\MyDocuments\). The second will let you read it a screen at a
time. (And Microsoft claims that DOS is dead!)

Hope this helps.

--
Charles Kenyon

Word New User FAQ & Web Directory:
http://www.addbalance.com/word

Legal Users' Guide to Microsoft Word(supplemented)
http://www.addbalance.com/usersguide
 --------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.


Quote:

> In several recent posts I've seen a recommendation, for Word add-ins,
> to have each user's login script automatically copy global templates
> from a network folder to the user's local drive.  The main advantage:
> It's easier to maintain/update the global template because since it's
> not "in use" so you don't have to get everyone to close Word whenever
> you update the global.

> The step I'm missing is how to write that network login script, what
> to name it, and where to put it.

> Can I just write a DOS batch file with a COPY command?  Can it even
> just be part of the Autoexec.bat?  If not, could someone point me to
> a resource for learning to write these things?

> Many thanks.


> -------------- "Life is nothing if you aren't obsessed." --John Waters
> ----------------------------------------------------------------------



Mon, 11 Aug 2003 13:30:15 GMT  
 Global templates and login scripts

Quote:

> The login script is a function of your networking software.
> I haven't done scripting for years (I don't have that kind of
> network permissions). If you have a network administrator, ask
> him/her about this.

> You could put it in a DOS batch file each user's Windows startup
> folder (inside the Programs folder).

Thanks!  That seems simplest.  Is there a major benefit to doing it
as a login script instead?  (That's what I see mentioned most often,
but at my limited level I grimace and say 'why reinvent the wheel?')
BTW there's no exhuming the network administrator here.....


--------------- "Life is nothing if you aren't obsessed." --John Waters
-----------------------------------------------------------------------



Mon, 11 Aug 2003 16:42:25 GMT  
 Global templates and login scripts
Hi Mark,

Have you tried:

Name c:\temp\MySource.dot As f:\MyNewLoc\MyDestination.dot

under VBA?

Krgrds,
Perry



Quote:

> In several recent posts I've seen a recommendation, for Word add-ins,
> to have each user's login script automatically copy global templates
> from a network folder to the user's local drive.  The main advantage:
> It's easier to maintain/update the global template because since it's
> not "in use" so you don't have to get everyone to close Word whenever
> you update the global.

> The step I'm missing is how to write that network login script, what
> to name it, and where to put it.

> Can I just write a DOS batch file with a COPY command?  Can it even
> just be part of the Autoexec.bat?  If not, could someone point me to
> a resource for learning to write these things?

> Many thanks.


> -------------- "Life is nothing if you aren't obsessed." --John Waters
> ----------------------------------------------------------------------



Mon, 11 Aug 2003 23:52:57 GMT  
 Global templates and login scripts

Hi Perry,

Actually yes, I'd hoped to be able to do it with VBA, but since
VBA is only open when Word is open, it won't let me do that
(replace/update the add-in) then, since it's "in use."  Is
there a way to run the VBA statement you suggest without
having Word open?  

I did get it to work using a DOS batch file in the Windows
startup folder -- made me a little queasy, ;)  and I figured
out it has to be a *shortcut* to the batch file or else the
DOS window can't be made to close automatically after it runs.
But something tells me that's not The Cool Way to do it.  Eh?

Quote:

> Hi Mark,

> Have you tried:

> Name c:\temp\MySource.dot As f:\MyNewLoc\MyDestination.dot

> under VBA?

> Krgrds,
> Perry



> > In several recent posts I've seen a recommendation, for Word add-ins,
> > to have each user's login script automatically copy global templates
> > from a network folder to the user's local drive.  The main advantage:
> > It's easier to maintain/update the global template because since it's
> > not "in use" so you don't have to get everyone to close Word whenever
> > you update the global.

> > The step I'm missing is how to write that network login script, what
> > to name it, and where to put it.

> > Can I just write a DOS batch file with a COPY command?  Can it even
> > just be part of the Autoexec.bat?  If not, could someone point me to
> > a resource for learning to write these things?

> > Many thanks.


> > -------------- "Life is nothing if you aren't obsessed." --John Waters
> > ----------------------------------------------------------------------



Tue, 12 Aug 2003 03:15:46 GMT  
 Global templates and login scripts
My recollection is that login scripts are easier and more flexible than
XCOPY.
--
Charles Kenyon

Word New User FAQ & Web Directory:
http://www.addbalance.com/word

Legal Users' Guide to Microsoft Word(supplemented)
http://www.addbalance.com/usersguide
 --------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.


Quote:

> > The login script is a function of your networking software.
> > I haven't done scripting for years (I don't have that kind of
> > network permissions). If you have a network administrator, ask
> > him/her about this.

> > You could put it in a DOS batch file each user's Windows startup
> > folder (inside the Programs folder).

> Thanks!  That seems simplest.  Is there a major benefit to doing it
> as a login script instead?  (That's what I see mentioned most often,
> but at my limited level I grimace and say 'why reinvent the wheel?')
> BTW there's no exhuming the network administrator here.....


> --------------- "Life is nothing if you aren't obsessed." --John Waters
> -----------------------------------------------------------------------



Tue, 12 Aug 2003 03:08:33 GMT  
 Global templates and login scripts
Hi Mark,

Quote:
> But something tells me that's not The Cool Way to do it.  Eh?

I'm here, I'm here ... yep!

But, I would use a small VB project to do this.
The
Name As
and
FileCopy
statements are to your disposal as well.
Module Sub Main() compiling to an executable, and
placing this .exe file in Win NT task scheduler would do the trick ...

No DOS screens to worry about ...
No Word to worry about ...
Then again, Visual Studio has to be available in your developing tools ...

Krgrds,
Perry



Quote:

> Hi Perry,

> Actually yes, I'd hoped to be able to do it with VBA, but since
> VBA is only open when Word is open, it won't let me do that
> (replace/update the add-in) then, since it's "in use."  Is
> there a way to run the VBA statement you suggest without
> having Word open?

> I did get it to work using a DOS batch file in the Windows
> startup folder -- made me a little queasy, ;)  and I figured
> out it has to be a *shortcut* to the batch file or else the
> DOS window can't be made to close automatically after it runs.
> But something tells me that's not The Cool Way to do it.  Eh?


> > Hi Mark,

> > Have you tried:

> > Name c:\temp\MySource.dot As f:\MyNewLoc\MyDestination.dot

> > under VBA?

> > Krgrds,
> > Perry



> > > In several recent posts I've seen a recommendation, for Word add-ins,
> > > to have each user's login script automatically copy global templates
> > > from a network folder to the user's local drive.  The main advantage:
> > > It's easier to maintain/update the global template because since it's
> > > not "in use" so you don't have to get everyone to close Word whenever
> > > you update the global.

> > > The step I'm missing is how to write that network login script, what
> > > to name it, and where to put it.

> > > Can I just write a DOS batch file with a COPY command?  Can it even
> > > just be part of the Autoexec.bat?  If not, could someone point me to
> > > a resource for learning to write these things?

> > > Many thanks.


> > > -------------- "Life is nothing if you aren't obsessed." --John Waters
> > > ----------------------------------------------------------------------



Tue, 12 Aug 2003 03:40:08 GMT  
 Global templates and login scripts

[...]

Quote:
> Then again, Visual Studio has to be available in your developing
> tools

Ouch......

Oh well.  I guess I'm glad they haven't snuffed DOS yet.  ;-|

M.



Tue, 12 Aug 2003 07:27:49 GMT  
 Global templates and login scripts
You might want to have two templates, your global that is in the Startup
folder and a second "temporary" global that is loaded by the first as part
of an AutoExec macro.

Global template checks to see if Checker template is loaded as a global, if
not, loads Checker template as a global.
If Checker template is already loaded as a global, unloads Checker.

Checker's AutoExec macro checks status of file dates for Global template.
If Global on server is newer than Global on local drive Checker unloads
Global as a global and copies the file from server.
Checker then reloads Global as a global. Global should then unload Checker.
If file dates are the same, Checker just unloads itself. (Don't know if this
will work, if not, should be able to call a macro in Global to unload
Checker.

Meanwhile, user is sitting there wondering what is going on? <g> Just some
thoughts.
--
Charles Kenyon

Word New User FAQ & Web Directory:
http://www.addbalance.com/word

Legal Users' Guide to Microsoft Word(supplemented)
http://www.addbalance.com/usersguide
 --------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.


Quote:
> Hi Mark,

> > But something tells me that's not The Cool Way to do it.  Eh?
> I'm here, I'm here ... yep!

> But, I would use a small VB project to do this.
> The
> Name As
> and
> FileCopy
> statements are to your disposal as well.
> Module Sub Main() compiling to an executable, and
> placing this .exe file in Win NT task scheduler would do the trick ...

> No DOS screens to worry about ...
> No Word to worry about ...
> Then again, Visual Studio has to be available in your developing tools ...

> Krgrds,
> Perry



> > Hi Perry,

> > Actually yes, I'd hoped to be able to do it with VBA, but since
> > VBA is only open when Word is open, it won't let me do that
> > (replace/update the add-in) then, since it's "in use."  Is
> > there a way to run the VBA statement you suggest without
> > having Word open?

> > I did get it to work using a DOS batch file in the Windows
> > startup folder -- made me a little queasy, ;)  and I figured
> > out it has to be a *shortcut* to the batch file or else the
> > DOS window can't be made to close automatically after it runs.
> > But something tells me that's not The Cool Way to do it.  Eh?


> > > Hi Mark,

> > > Have you tried:

> > > Name c:\temp\MySource.dot As f:\MyNewLoc\MyDestination.dot

> > > under VBA?

> > > Krgrds,
> > > Perry



> > > > In several recent posts I've seen a recommendation, for Word
add-ins,
> > > > to have each user's login script automatically copy global templates
> > > > from a network folder to the user's local drive.  The main
advantage:
> > > > It's easier to maintain/update the global template because since
it's
> > > > not "in use" so you don't have to get everyone to close Word
whenever
> > > > you update the global.

> > > > The step I'm missing is how to write that network login script, what
> > > > to name it, and where to put it.

> > > > Can I just write a DOS batch file with a COPY command?  Can it even
> > > > just be part of the Autoexec.bat?  If not, could someone point me to
> > > > a resource for learning to write these things?

> > > > Many thanks.

> > > > -- Mark Tangard


- Show quoted text -

Quote:
> > > > -------------- "Life is nothing if you aren't obsessed." --John
Waters

> ----------------------------------------------------------------------



Tue, 12 Aug 2003 15:22:59 GMT  
 Global templates and login scripts
Well, I simply add an xcopy \\Server\MasterTemplates\*.*  c:\templates to
the NT4 login script and have all user's Word options point to c:\templates.
This is replicated around the domain.

It works well and copes with frequent template additions / updates.
Anything urgent I tell users to login again.

YMMV
Cliff


Quote:

> In several recent posts I've seen a recommendation, for Word add-ins,
> to have each user's login script automatically copy global templates
> from a network folder to the user's local drive.  The main advantage:
> It's easier to maintain/update the global template because since it's
> not "in use" so you don't have to get everyone to close Word whenever
> you update the global.

> The step I'm missing is how to write that network login script, what
> to name it, and where to put it.

> Can I just write a DOS batch file with a COPY command?  Can it even
> just be part of the Autoexec.bat?  If not, could someone point me to
> a resource for learning to write these things?

> Many thanks.


> -------------- "Life is nothing if you aren't obsessed." --John Waters
> ----------------------------------------------------------------------



Wed, 13 Aug 2003 06:02:06 GMT  
 Global templates and login scripts
Hi Mark!

Our shop works as follows:

All workstations have the following directories (if not, created at login
script time by command below

c:\templates\startup
c:\templates\wktempl

Server directories (editable at any time):

\\server\templates\startup
\\server\templates\wktempl

The following command is run every time a user logs on:

XCOPY32 \\server\templates\*.* c:\templates /e /d

/e = include subdirectories
/d = copies down updated files only

We also use XCOPY32 to update any critical workstation files as needed.

Hope this helps!


Quote:

> In several recent posts I've seen a recommendation, for Word add-ins,
> to have each user's login script automatically copy global templates
> from a network folder to the user's local drive.  The main advantage:
> It's easier to maintain/update the global template because since it's
> not "in use" so you don't have to get everyone to close Word whenever
> you update the global.

> The step I'm missing is how to write that network login script, what
> to name it, and where to put it.

> Can I just write a DOS batch file with a COPY command?  Can it even
> just be part of the Autoexec.bat?  If not, could someone point me to
> a resource for learning to write these things?

> Many thanks.


> -------------- "Life is nothing if you aren't obsessed." --John Waters
> ----------------------------------------------------------------------



Wed, 13 Aug 2003 10:26:20 GMT  
 Global templates and login scripts

Cliff, this sounds ideal, but I'm still missing the ground-level answer
on what a login script is named and where it's stored.  (Seem this is
yet another case of missing a huge chunk of what I should know & having
nobody around who understands it nor any documentation.)  It surprises
me a little to learn that networking software varies so much that it
isn't possible to know this answer.  Is it?

Quote:

> Well, I simply add an xcopy \\Server\MasterTemplates\*.*  c:\templates to
> the NT4 login script and have all user's Word options point to c:\templates.
> This is replicated around the domain.

> It works well and copes with frequent template additions / updates.
> Anything urgent I tell users to login again.

> YMMV
> Cliff



> > In several recent posts I've seen a recommendation, for Word add-ins,
> > to have each user's login script automatically copy global templates
> > from a network folder to the user's local drive.  The main advantage:
> > It's easier to maintain/update the global template because since it's
> > not "in use" so you don't have to get everyone to close Word whenever
> > you update the global.

> > The step I'm missing is how to write that network login script, what
> > to name it, and where to put it.

> > Can I just write a DOS batch file with a COPY command?  Can it even
> > just be part of the Autoexec.bat?  If not, could someone point me to
> > a resource for learning to write these things?

> > Many thanks.


> > -------------- "Life is nothing if you aren't obsessed." --John Waters
> > ----------------------------------------------------------------------



Wed, 13 Aug 2003 13:04:23 GMT  
 Global templates and login scripts
Without knowing your networking software I don't think anyone can answer
this question. Login scripts are peculiar to each networking protocol and
probably differ to some extent between versions.
--
Charles Kenyon

Word New User FAQ & Web Directory:
http://www.addbalance.com/word

Legal Users' Guide to Microsoft Word(supplemented)
http://www.addbalance.com/usersguide
 --------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.


Quote:

> Cliff, this sounds ideal, but I'm still missing the ground-level answer
> on what a login script is named and where it's stored.  (Seem this is
> yet another case of missing a huge chunk of what I should know & having
> nobody around who understands it nor any documentation.)  It surprises
> me a little to learn that networking software varies so much that it
> isn't possible to know this answer.  Is it?


> > Well, I simply add an xcopy \\Server\MasterTemplates\*.*  c:\templates
to
> > the NT4 login script and have all user's Word options point to
c:\templates.
> > This is replicated around the domain.

> > It works well and copes with frequent template additions / updates.
> > Anything urgent I tell users to login again.

> > YMMV
> > Cliff



> > > In several recent posts I've seen a recommendation, for Word add-ins,
> > > to have each user's login script automatically copy global templates
> > > from a network folder to the user's local drive.  The main advantage:
> > > It's easier to maintain/update the global template because since it's
> > > not "in use" so you don't have to get everyone to close Word whenever
> > > you update the global.

> > > The step I'm missing is how to write that network login script, what
> > > to name it, and where to put it.

> > > Can I just write a DOS batch file with a COPY command?  Can it even
> > > just be part of the Autoexec.bat?  If not, could someone point me to
> > > a resource for learning to write these things?

> > > Many thanks.


> > > -------------- "Life is nothing if you aren't obsessed." --John Waters
> > > ----------------------------------------------------------------------



Fri, 15 Aug 2003 15:27:52 GMT  
 
 [ 13 post ] 

 Relevant Pages 

1. Refering to Functions and Subs held in one global template from another global template

2. Global.MPT and Enterprise Global Template

3. Is it possible to trigger an event when a template is loaded as a global template

4. vbscript login scripts - starting a script from the Windows 95 command prompt

5. Script to remove login script by OU.

6. Add, Remove CommandBar and Avoid Global Template Changes

7. SOLVED: Add, Remove CommandBar and Avoid Global Template Changes

8. "Global Template"

9. VBA: Copy Import map from custom template to Global.mpt

10. Global Template Elements

11. .. lack of enterprise global template ...

12. Using data from a Global Template

 

 
Powered by phpBB® Forum Software