Re: Newbie to logon scripts - how to make a script run once only?
- From: "Richard Mueller" <rlmueller-NOSPAM@xxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 10 Nov 2006 11:13:59 -0600
Stephen wrote:
I have a very simple logon script which runs an .msi file to install
the SOAP toolkit. The script has but one line -
<path>soapsdk.msi /quiet
I want this to run once and once only when the user logs on.
How do I do that? Or is it even possible?
You need to be able to test for something that indicates whether or not the
..msi has run. If the .msi deploys a file or creates a folder, your logon
script can check for the existence. If the .msi creates a registry entry,
you can check for that. If the .msi updates a file, you may be able to check
the file version or date.
Another option is to have the logon script itself do something that you can
later test. For years I had logon scripts save what I called "flag" files.
The logon script would check for the existence of the flag file. If it
existed, exit. Otherwise deploy and save the flag file. The location and
nature of the flag file depends on the deployment. If you want something
deployed once for each computer, the flag file is saved somewhere on the
computer accessible to all. If the deployment is once per user on each
computer, then you must save the flag file in a different location for each
user, or name the flag file in some way specific to the user.
Instead of flag files, you can do the same thing with registry entries. For
a deployment to the computer, save a registry setting in HKLM. For a
deployment to the user, save in HKCU.
--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
.
- Follow-Ups:
- Re: Newbie to logon scripts - how to make a script run once only?
- From: Richard Mueller
- Re: Newbie to logon scripts - how to make a script run once only?
- References:
- Newbie to logon scripts - how to make a script run once only?
- From: mulhollands
- Newbie to logon scripts - how to make a script run once only?
- Prev by Date: Re: Creating a user in AD but it's not disabled !!
- Next by Date: Re: Newbie to logon scripts - how to make a script run once only?
- Previous by thread: Re: Newbie to logon scripts - how to make a script run once only?
- Next by thread: Re: Newbie to logon scripts - how to make a script run once only?
- Index(es):
Relevant Pages
|