✅ 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.
9 Replies
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.I am not having issues installing the features. I am having issues to update WSL and importing a distro. It required to use the user profile\account and it does not work with System
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.what do you mean by that?
isn't this already scriptable outside of c# coding?
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.