Create environment variables for a new user in C#

后端 未结 1 1916
你的背包
你的背包 2021-01-13 15:05

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

相关标签:
1条回答
  • 2021-01-13 15:59

    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.

    0 讨论(0)
提交回复
热议问题