Written by Ed Tippelt, ert@pobox.com, copyright 2006
Active setup is a process that runs automatically when a user logs in.
Registry keys at
HKLM\Software\Microsoft\Active Setup\Installed Components\%APPNAME%
and
HKCU\Software\Microsoft\Active Setup\Installed Components\%APPNAME%
are compared, and if the HKCU registry entries don't exist, or the
version number of HKCU is less than HKLM, then the specified
application is executed for the current user.
If your application requires installation of components such as
files or registry keys on a per-user basis, but your application
has no advertised entry points or other triggers to initiate the
installation process, then Active Setup is the solution.
To implement Active Setup, you need to package all your user
installation requirements into an EXE preferably,
using SMS Installer, or Wise Installation System for example,
and place the EXE on the client workstation
during the main application installation process.
In addition, populate the following registry key with two ( REG_SZ ) values:
KEY:
HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\%APPNAME% -
where %APPNAME% is an arbitrary string which can be the application name,
or its product code GUID if using an MSI.
(As long as it is unique on that workstation!)
VALUE1:
StubPath=
VALUE2:
Version=1
When each new user logs on, the operating system compares Active Setup
keys between HKLM and HKCU, and runs the nominated executable if the
HKCU entry is missing or the version in HKCU is less than HKLM.
So if you ever need to update the ActiveSetup executable, just install
a new version, and increment the Version registry key (VALUE2 above)
in HKLM. Next time the user logs on, the active setup will run again
for that user.
To force a repair using the existing MSI where a separate Active Setup
EXE is not required, you can do it this way:
Create the following key structure under HKEY_LOCAL_MACHINE hive:
HKEY_LOCAL_MACHINE\Software\Microsoft\Active Setup\Installed Components\[ProductCode]
Under this registry key, create a
"StubPath"="msiexec /fauvs {ProductCode} /qb"
The MSIEXEC options can be found in the help file MSI.CHM, which is
part of the windows installer SDK.
Courtesy: http://www.etlengineering.com/installer/activesetup.txt
No comments:
Post a Comment