C
C#12mo ago
Vicerak

✅ 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
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Accord
Accord12mo ago
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.
Vicerak
Vicerak12mo ago
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
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Accord
Accord12mo ago
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.
Vicerak
Vicerak12mo ago
what do you mean by that?
Mayor McCheese
Mayor McCheese12mo ago
isn't this already scriptable outside of c# coding?
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Accord
Accord12mo ago
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.