Purpose: How to Deploy an Application with User Settings (HKCU) in SCCM 2012
Many applications contain settings only for the current user (HKCU). There is no way to replicate these settings for the local machine (HKLM) as the program is designed to read the settings only from the current user registry or current user profile documents (%APPDATA%). Now in corporate environment, you can use group policies, logon scripts, and such to manage your user based settings. However, if you want to keep all of it in the SCCM, there is a way for you to do it.
Create all the binaries and configuration that you want or can install for the local machine (HKLM) in the first deployment type (just like any normal application package). Leave our all the user based settings that you want to deploy with SCCM from the first deployment type, as you will now separate HKLM-based installation files and HKCU-based installation files in their own deployment types.
Create the deployment type for the current user (HKCU). Put all the configuration files, registry changes (and so on) into this deployment type that will target the current user. You need to set this deployment to install ONLY when there is an actual user logged in the workstation.
We need to set the USER BASED -deployment type priority to be higher than the MACHINE BASED -deployment type. This way the system will first try to install the USER BASED -deployment type.
Because we have set the USER BASED -deployment type to be of a higher priority, we need to set it to depend on the MACHINE BASED -deployment type. This way, the MACHINE BASED -deployment type will launch itself before the USER BASED -deployment type because of the dependency. Now we have an installation order of: First install the application and then install the user based settings.
Downside of this is the fact that the application installs only when there is an user logged in the system, so this method might work well in some cases but horribly in others. You need to use your deduction of how to use this correctly in your environment.