Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fulltrustprocesslauncher does not exist in current context

Tags:

powershell

uwp

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

like image 848
maximdj Avatar asked Mar 06 '26 20:03

maximdj


1 Answers

I needed to add:

using Windows.ApplicationModel;
like image 172
maximdj Avatar answered Mar 08 '26 12:03

maximdj



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!