Video Screencast Help
Endpoint Management Community Blog

Using Active Setup with Wise Packages

Created: 28 Mar 2007 • Updated: 11 Jun 2007 • 2 comments
DavidLockwood's picture
0 0 Votes
Login to vote

The Active Setup key in the registry allows you to specify a command that should run the first time a new user logs on. You can do some pretty cool things once you know how to leverage this key. Read on to get started.

Problem:

Using Active Setup

An application needs to launch a repair when a new user logs on to insert per-user information in to the user profile. Examples of per-user information might be a registry key under HKCU or a file in the user profile under the My Documents folder.

In order to activate a repair a valid application entry point must be launched (advertised shortcut, extension, COM information).

What if an application doesn't have an entry point? What about a plug-in for Excel with no shortcut? Oh dear.

Solution:

Active Setup

The Active Setup key in the registry allows you to easily specify a command that should run the first time a new user logs on. You can use this to force a repair with the command line msiexec /f {ProductCode} where ProductCode is a the ProductCode property taken from the Property table of the MSI. This is in the GUID format.

Example:

  1. Add the following key to the registry
    HKEY_LOCAL_MACHINE\Software\Microsoft\Active Setup\Installed Components\{3bf42070-b3b1-11d1-b5c5-0000f8056996}
    
    

    Note: The GUID can be any valid GUID as long as it is unique on the machine.

  2. Add the following value for that key
    Value name: StubPath
    Type: Reg_Expand_Sz
    Value: C:\windows\notepad.exe
  3. Log off your machine and log on as a new user. Notepad will appear the first time you log on to the machine.

Notepad is just an example. You could specify any command line here. Typically you would specify msiexec /f and then the ProductCode of the package you wish to force a repair on.

Comments 2 CommentsJump to latest comment

bsuggs's picture

You did not mention the "version" value name that can be added.

Add the following value for that key
Value name: Version
Type: Reg_Expand_Sz
Value: 1

When each new user logs on, the operating system compares Active Setup keys between HKLM and HKCU, and runs the StubPath executable if the HKCU entry is missing or the version in HKCU is less than HKLM.

This is used mostly for RunOnce per profile situations.

-2
Login to vote
sharma's picture

can any one tell why we use active setup insted of run

0
Login to vote