![]() |
|
![]() |
Active Setup |
It appears to be a handy way of getting something to run once per-user and could be useful if you don't have any shortcuts or other advertising mechanisms in your package.
There seem to be a number of variations on what is possible but the following registry extract is a good example:
REGEDIT4 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{22d6f312-b0f6-11d0-94ab-0080c74c7e95}] @="Microsoft Windows Media Player 6.4" "ComponentID"="mediaplayer_W2K" "IsInstalled"=dword:00000001 "DontAsk"=dword:00000002 "Locale"="EN" "StubPath"="rundll32.exe advpack.dll,LaunchINFSection C:\\WINNT\\INF\\mplayer2.inf,PerUserStub.NT" "Version"="6,4,9,1109"
The part in "bold" is any unique key for that box, a GUID is one way of making sure its unique. The 2 "red" values are the most important, the "StubPath" is the Executable and its command line and the "Version" should be set to a new value if the command ever needs to be re-executed.
For other active setup information see:
Example - My Test |
The following shows an attempt at a solution for getting user information "repaired" when the user logs on (rather than repaired via advertised shortcuts etc). You may want to use other "MSIEXEC.EXE" switches...
There are two problems with this approach:
#define ActiveSetupKey SOFTWARE\Microsoft\Active Setup\Installed Components\[ProductCode] <$Component "ActiveSetup" Create="Y" Directory_="INSTALLDIR"> #( <$Registry HKEY="LOCAL_MACHINE" Key="<$ActiveSetupKey>" Value="TESTMSI" MsiFormatted="KEY" > #) #( <$Registry HKEY="LOCAL_MACHINE" Key="<$ActiveSetupKey>" Name='Version' Value="1" MsiFormatted="KEY" > #) #( <$Registry HKEY="LOCAL_MACHINE" Key="<$ActiveSetupKey>" Name='StubPath' Value="msiexec.exe /f [ProductCode]" MsiFormatted="KEY,VALUE" KeyPath="Y" > #) <$/Component>
![]() ![]() |
| ![]() ![]() |