Godspeed
Explore posts from serversRunning PowerShell to install MSIX from .NET MAUI
I am trying to implement a custom auto-updating solution, as the Appinstaller program has issues with the latest Windows Security Update.
I am running a process that checks for new update, and if there is one, it downloads the new MSIX.
I am able to download the MSIX file, and I am trying to install it using the PowerShell.Core.SDK, with the following code:
I am having issues getting the
Add-AppxPackage
command to work from the instantiated PowerShell. I retrieve errors from ps.Streams.Errors.
The main error output I get is {The 'Add-AppxPackage' command was found in the module 'Appx', but the module could not be loaded. For more information, run 'Import-Module Appx'.}
.
Thus, I tried adding scriptContents.AppendLine("Import-Module Appx");
.
This only resulted in the error {Operation is not supported on this platform. (0x80131539)}
.
Googling a bit, I found a GitHub issue referencing this error, https://github.com/PowerShell/PowerShell/issues/13138.
Thus, I added the flag to it as such: scriptContents.AppendLine("Import-Module Appx -UseWindowsPowerShell");
.
I am not sure if this is a good solution on its own, as some comments mentioned that this flag is not supported on Windows 11.
Anyway, adding this flag avoid the last error, but returns us to the first error {The 'Add-AppxPackage' command was found in the module 'Appx', but the module could not be loaded. For more information, run 'Import-Module Appx'.}
.
Q: How can I avoid this error? Am I missing something? Is it not possible?
I need this to work on a variety of Windows machines (personal, consumer units). Is there a better approach than the PowerShell.Core.SDK?13 replies
MSIX URI is inaccessible in Appinstaller
Hello,
I have an Appinstaller and MSIX hosted in a public Google Cloud Storage bucket, meaning they have directly accessible URIs on the form "https://storage.googleapis.com/{bucket-name}/{file-name}".
However, the Appinstaller gives the (not very detailed) message "Error in parsing the app package" when I attempt to run it.
The Windows Logs for AppXDeployment give no useful insight.
I have tested this with MSIX Troubleshooter (https://www.advancedinstaller.com/msix-troubleshooter.html), and it tells me that the Appinstaller URI is "accessible" and the MSIX URI is "not accessible".
If both are hosted in the same public bucket, how come the appinstaller sees MSIX as inaccessible and the other one not?
The Appinstaller looks like this ish:
11 replies
Disable prerendering on a single component in Blazor WASM
I currently have prerendering enabled in my Blazor WASM hosted project (in
_Host.cshtml
through <component type="typeof(App)" render-mode="WebAssemblyPrerendered" />
), and prerendering works.
However, I have one component in my app that should not be prerendered, and it's prerendered state would only cause confusion by my users. Is there a good way to exclude a single component from prerendering?31 replies