View Single Post
Old 05-26-2008   #3 (permalink)
Nicola M


 
 

Re: HowTo run a vbscrit once?

"Pegasus (MVP)" wrote:
Quote:

>
> "Nicola M" <NicolaM@xxxxxx> wrote in message
> news:4BC1BF07-3DFE-4F70-972E-F98546DA5873@xxxxxx
Quote:

> > Hi all and sorry in advance for my English.
> >
> > I wrote a vbs script to manage network printers. This script deletes all
> > network printers installed on a client and then install devices indicated
> > in
> > the script, only.
> > It's possible that an user connect printers not listed in the script,
> > manually.
> > The script is distributed by group policy in a W2K Active Directory
> > Environment so it runs at every user logon.
> > So: to avoid deleting and installing printers at every logon what do i do
> > to
> > get script runs once?
> >
> > Thanks.
> > Nicola M
> >
>
> Here are a couple options:
> - You could invoke it via the RunOnce registry key.
> - You could get the script to create a "semaphore" file
> to signal that the script has run once before.
The first one is more suitable. But... how can I put the invocation of the
script in that registry Key?
So, with vbs there's no a limit accessing registry? I use VBA also and I can
write and read from HKEY_CURRENT_USER\Software\VB and VBA Program Settings\
only.
Thanks.
Nicola M

My System SpecsSystem Spec