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 FAQ (the 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, 2008 & 2009 for the Windows SDK (Windows Installer) area.Please 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 May 28 2022 at 3:11pm
Visit MAKEMSI's Home Page
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.