I am trying to figure out how to execute a powershell script from my uwp desktop application. I think I am sort of going in the right direction but need a bit of help. I am getting "The name FullTrustProcessLauncher does not exist in the current context". I have checked the references and I have the Windows Desktop extensions for the UWP.
Can someone help thanks
Mainpage.xaml
private async void doSomething(object sender, RoutedEventArgs e)
{
await FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync();
}
package manifest
<Applications>
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="ProjectCuwp.App">
<Extensions
xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10">
<desktop:Extension
Category="windows.fullTrustProcess"
Executable="powershell.exe" />
References installed: Windows Desktop Extensions for the UWP
I needed to add:
using Windows.ApplicationModel;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With