MAKEMSI quickly and reliably creates MSI files in a non-programmatic way
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
[Bottom][Contents][Prev]: Active Setup[Next]: ProvideComponent
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->Windows Installer Basics->Installation Types (per-user or per-machine)->Per-Machine Installations with some Per-User Resources->HKLM Run Key

HKLM Run Key

The following is an example of some registry values which you want installed for every user:

<$Component "CurrentUser" Create="Y" Directory_="INSTALLDIR" CU="Y">
   #(
       <$Registry
                  HKEY="CURRENT_USER"
                   Key="SOFTWARE\ABCDEFGHIJ"
                  Name='AAA'
                 Value="VAL-AAA-[Date]"
          MsiFormatted="VALUE"
       >
   #)
<$/Component>

What you do when the process/script runs is up to you, it could simply copy shortcuts/files into the users profile or it could invoke Windows Installer repairs.

The following is an example of how to "register" a script to be run when users logon:

<$Component  "RunScriptAtUserLogon" Directory_="INSTALLDIR">
#(
    ;--- Run script at user logon (script contains actions to install peruser resources) ---
    <$Registry
              HKEY="LOCAL_MACHINE"
               KEY="SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
              Name="<$ProdInfo.ProductName><$ProductVersion>"
             Value=^wscript.exe //NoLogo "[!LogonScript]"^      ;;Refer to the script via the file's "RowKey".
      MsiFormatted="VALUE"
           KEYPATH="Y"
    >
#)
<$/Component>


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006 & 2007 for the Windows SDK (Windows Installer) area.This external link was OK when tested at 15 Nov 2008Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: Active Setup[Next]: ProvideComponent


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Saturday November 15 2008 at 2:05pm
Visit MAKEMSI's Home PageThis external link was OK when tested at 7 Nov 2008

HTML page dated Mon, 29 Jan 2007 00:11:11 GMT
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006 & 2007 for the Windows SDK (Windows Installer) area.This external link was OK when tested at 15 Nov 2008