We are trying to build an installer, in Wix, for a product. Part of this product requires the installation of elasticsearch as a service, and getting it running as a servic
Yes, from C# you can P/Invoke the LoadUserProfile
Win32 API function. This will create the user's profile if it does not already exist, and load the user's registry hive.
I would not recommend this approach for an account that will be used for interactive logons, but it should be safe enough for a service account.