Vicerak
Vicerak
CC#
Created by Vicerak on 7/18/2023 in #help
✅ MSI Installers
I am working on generate a msi installer using Visual Studio Installer Projects 2022. The idea is to load the files into the user's computer and run a .exe file that performs the following: 1) Enable Required Windows features to install WSL 2) Reboot PC if needed 3) Run wsl. exe -- update 4) Download a Distro and import it to the Machine. I am having issues when executing Steps 3 and 4. After some research, I discovered that the issue is because wsl requires the User Profile, and since I am calling the executable using the Msi file, and is running as System Account. Does anyone know any code that I can use to switch from the system account to the user that runs the MSI file? I am really new to C#. I know this must be possible.
14 replies